Closed Bug 1541193 Opened 5 years ago Closed 5 years ago

In js shell test runner, pass some --args when running skip-if tests

Categories

(Core :: JavaScript Engine, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

Attachments

(2 files)

jstests.py takes a --args option which you can use to specify command-line arguments to be passed to the JS shell when running tests.

Currently we do not pass these arguments when running the shell under XULInfoTester, to evaluate skip-if and slow-if conditions. The idea is that those tests run in a "safe mode", with the JITs disabled.

Unfortunately this means we can't run tests with an experimental feature like fields enabled. jstests.py --args --enable-experimental-fields ./dist/bin/js fields doesn't work, because the --enable-experimental-fields is not passed to the shell when running the skip-if feature-test. Fields are therefore not enabled when the feature-test runs. The test harness simply skips all the tests.

We need an option like --args but more so. --aaaaaaaaaargh maybe.

Regular --args are ignored when running a skip-if or slow-if test; these are not.

Ran across this while adding --feature-args. jstests.py and jit_test.py both
accept --args, but with slightly different behavior. The two test runners
should behave the same, as much as reasonably possible. In this case
jit_test.py is doing it right; parsing a string of command-line arguments by
splitting on spaces is not the best idea.

(Alas, this does not fix the ludicrous restriction that skip-if expressions
can't have spaces in them.)

Depends on D25856

Attachment #9055297 - Attachment description: Bug 1541193 - Part 1: Add `--feature-args ARGS` option to JS shell test runner. → Bug 1541193 - Part 1: Add `--feature-args ARGS` option to JS shell test runner. r?khyperia
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/13a7bc1bd65a
Part 1: Add `--feature-args ARGS` option to JS shell test runner. r=khyperia
https://hg.mozilla.org/integration/autoland/rev/069ad2c1f66c
Part 2: Parse `--args` arguments POSIX-style too. r=khyperia
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jorendorff
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: