Closed Bug 537302 Opened 13 years ago Closed 13 years ago

jstest shell harness: allow running from other directories

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dmandelin, Assigned: dmandelin)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Attached patch PatchSplinter Review
Currently, the jstest shell harness only works correctly if run from its directory (js/src/tests). This patch allows it to be run from other directories.
Attachment #419602 - Flags: review?(jorendorff)
Does this patch work with the current tests in ecma_5/Object?  I added some shell-only tests that rely on the current working directory's identity (see the n-of-4 tests there), and at a very cursory glance here I'm not sure whether the cwd while the tests run is js/src/tests any longer or not.
(In reply to comment #1)
> Does this patch work with the current tests in ecma_5/Object?  I added some
> shell-only tests that rely on the current working directory's identity (see the
> n-of-4 tests there), and at a very cursory glance here I'm not sure whether the
> cwd while the tests run is js/src/tests any longer or not.

Yes, it works with the new tests. I did it by having the test harness change its cwd just before running the tests. It first converts the path to the JS shell to absolute, so it's still OK to pass a relative path on the command line.
Attachment #419602 - Flags: review?(jorendorff) → review+
http://hg.mozilla.org/tracemonkey/rev/b1d30a2e0e50
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/b1d30a2e0e50
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.