Open Bug 1844656 Opened 2 years ago Updated 2 years ago

./mach jstestbrowser's TEST_PATH parameter help message doesn't match the behavior

Categories

(Testing :: Reftest, defect)

defect

Tracking

(Not tracked)

People

(Reporter: arai, Unassigned)

Details

https://searchfox.org/mozilla-central/rev/d35b3fe3d8230a255b988afb0ebda1176fc2f50b/layout/tools/reftest/reftestcommandline.py#309-312

help="Path to test file, manifest file, or directory containing "
"tests. For jstestbrowser, the relative path can be either from "
"topsrcdir or the staged area "
"($OBJDIR/dist/test-stage/jsreftest/tests)",

it says the relative path from staged area can be used, but the following doesn't work,
and apparently it's trying to read non-staged files:

$ ./mach jstestbrowser js/src/tests/non262/global/parseInt-01.js
...
REFTEST ERROR | EXCEPTION: Error in manifest file file:///.../mozilla-unified/js/src/tests/test262/jstests.list line 3: unknown test type test262-raw

so far, specifying the relative path from topsrcdir to the staged file works for me, with TEST_PATH parameter:

./mach jstestbrowser OBJDIR/dist/test-stage/jsreftest/tests/js/src/tests/non262/global/parseInt-01.js

But the following works better, especially for when you want to run multiple tests.
So, it might be better mentioning the --filter option in the TEST_PATH parameter help?

./mach jstestbrowser --filter=non262/global/parseInt-01.js
./mach jstestbrowser --filter=non262/global/parseInt
Severity: -- → S3

the relative path rule applies only to directory

https://searchfox.org/mozilla-central/rev/2bd7d039738b1aab07c47549652be5ff9d06329d/layout/tools/reftest/runreftest.py#208,220,228-239

def findManifest(self, suite, test_file, subdirs=True):
...
    if os.path.isdir(test_file):
...
        if (
            len(rv) == 0
            and relative_path
            and suite == "jstestbrowser"
            and build_obj
        ):
            # The relative path can be from staging area.
            staged_js_dir = os.path.join(
                build_obj.topobjdir, "dist", "test-stage", "jsreftest"
            )
            staged_file = os.path.join(staged_js_dir, "tests", relative_path)
            return self.findManifest(suite, staged_file, subdirs)
You need to log in before you can comment on or make changes to this bug.