Closed
Bug 867744
Opened 12 years ago
Closed 7 years ago
Intl tests in jstests should not use relative includes
Categories
(Core :: JavaScript: Internationalization API, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 977849
People
(Reporter: decoder, Assigned: Waldo)
Details
The tests in js/src/tests/test402 seem to use relative loading of helper scripts (using $INCLUDE). We should avoid this behavior at all costs because it breaks fuzzer mutation (the fuzzer has to move the mutated test to a different directory). The proper solution would be to include all the helper functions in the shell.js file.
Comment 1•12 years ago
|
||
"At all costs" could be quite expensive :-)
These tests come from the Test262/Test402 conformance test suite maintained by Ecma TC39, and $INCLUDE is a commonly used mechanism in that test suite. We could modify the import script to add all included scripts into shell.js and browser.js, but then
(a) it would become harder to distinguish Test262/Test402 changes from Mozilla changes, and
(b) every test would load the contents of all include files, increasing the time it takes to run the tests.
Reporter | ||
Comment 2•12 years ago
|
||
What would also work is to INCLUDE using absolute paths instead of relative ones. The jit-test suite does that and passes the absolute path to the libdir as a constant to the tests. I don't know exactly how that can work in the jstests suite however.
Assignee | ||
Comment 3•12 years ago
|
||
Does load() have the same problem as loadRelativeToScript(), or no? It should be fairly easy to make that switch.
Inflating browser.js/shell.js with the full contents of the included files is, as comment 1 notes, not desirable. If we can't use any sort of loading functionality at all, that's a bit of a problem.
Assignee: general → jwalden+bmo
Reporter | ||
Comment 4•12 years ago
|
||
If we have to keep the loads, then I would favor to make the loads absolute, just like the loads in the jit-test suite (with the libdir constant). We could add the same mechanism to the jstests so all tests can use a basepath variable and then add their relative paths to that. It would also require a modification in the fuzzer but it's at least possible to solve it like this.
Comment 5•11 years ago
|
||
Mass-moving existing Intl-related bugs to the new Core :: JavaScript: Internationalization API component.
If you think this bug has been moved in error, feel free to move it back to Core :: JavaScript Engine.
[Mass change filter: core-js-intl-api-move]
Component: JavaScript Engine → JavaScript: Internationalization API
Comment 6•7 years ago
|
||
All $INCLUDE calls were removed as part of bug 977849.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•