Closed Bug 337216 Opened 18 years ago Closed 18 years ago

add target to makefile to invoke toolkit/components/feeds tests

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: davel, Assigned: davel)

References

Details

Attachments

(1 file, 3 obsolete files)

replace shell script (exectests.sh) with makefile targets similar to xpcshell-simple test harness examples
Attachment #221394 - Flags: review?(sayrer)
Comment on attachment 221394 [details] [diff] [review]
trunk patch to add "check" target and remove shell script

r=sayrer
Attachment #221394 - Flags: review?(sayrer) → review+
Blocks: test-harness
Checking in Makefile.in;
/cvsroot/mozilla/toolkit/components/feeds/Makefile.in,v  <--  Makefile.in
new revision: 1.2; previous revision: 1.1
done
Removing test/exectests.sh;
/cvsroot/mozilla/toolkit/components/feeds/test/exectests.sh,v  <--  exectests.shnew revision: delete; previous revision: 1.1
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: add target to makefile to invoke toolkit/compontent/feeds tests → add target to makefile to invoke toolkit/components/feeds tests
change breaks on cygwin - nsinstall does not like a directory as an arg
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm testing this now on win32, and will test on mac/win with a mozconfig that does not define an objdir.  if that works, I'll request review.

the libs:: target did not work because windws does not support nsinstall of directories

Since shell.js and test.js do not write anything to the current dir, I cd to the source dir before running the tests.  but DIST is relative to the objdir, so I had to add PWD to the path to run-mozilla.sh and xpcshell (and PWD is the dir before the cd)

abspath did not work, so I used realpath

realpath did not work if I used it on both run-mozilla.sh and xpcshell, so I only used it on the first one
Attachment #221394 - Attachment is obsolete: true
Comment on attachment 222228 [details] [diff] [review]
a version that will work on windows

realpath does not work
Attachment #222228 - Attachment is obsolete: true
is there a better way to wrap the xpcshell invocation?
Attachment #222274 - Flags: superreview?
Attachment #222274 - Flags: review?(sayrer)
Attachment #222274 - Flags: superreview? → superreview?(benjamin)
Comment on attachment 222274 [details] [diff] [review]
patch works on windows, mac, linux

ABS_DEPTH := $(shell cd $(DEPTH) && pwd) will make your life a lot simpler.
Attachment #222274 - Flags: superreview?(benjamin) → superreview-
Instead of making the wrappers aware of cwd, I've changed the test harness code for this component to pass the directory containing the tests to the test runner (shell.js).  I've tested on mac (intel), and will test on win/linux shortly.
on non-windows, shell.js parses the test data directory from the xpcshell command line

on windows, cd to the test data directory before running xpcshell (and use ABS_DEPTH as suggested by :bs to invoke xpcshell)
Attachment #223237 - Flags: superreview?(benjamin)
Attachment #223237 - Flags: review?(sayrer)
Attachment #222274 - Flags: review?(sayrer)
Comment on attachment 223237 [details] [diff] [review]
patch that special-cases windows due to path problems

+load(topDir.path+'/test.js');

r=sayrer, assuming that line works on Windows.
Attachment #223237 - Flags: review?(sayrer) → review+
Attachment #222274 - Attachment is obsolete: true
Attachment #223237 - Flags: superreview?(benjamin) → superreview+
Checking in Makefile.in;
/cvsroot/mozilla/toolkit/components/feeds/Makefile.in,v  <--  Makefile.in
new revision: 1.4; previous revision: 1.3
done
Checking in test/shell.js;
/cvsroot/mozilla/toolkit/components/feeds/test/shell.js,v  <--  shell.js
new revision: 1.2; previous revision: 1.1
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: