add ability to run xpcshell which only run tests that are annotated fail-if/skip-if <keyword>
Categories
(Testing :: XPCShell Harness, task)
Tracking
(firefox86 fixed)
| Tracking | Status | |
|---|---|---|
| firefox86 | --- | fixed |
People
(Reporter: jmaher, Assigned: jmaher)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
In the spirit of making this a well scoped bug, let me expand on this to fill in some blanks and make things less ambiguous.
First off web-platform-tests has a similar thing. All tests that are not expected PASS run as backlog jobs:
https://treeherder.mozilla.org/jobs?repo=mozilla-central&searchStr=backlog&revision=4ae3582e331240eff7bfd3bd16a33491358c5600
this work was initially done with this patch:
https://hg.mozilla.org/mozilla-central/rev/a9ed4f48957c43f387993bc387d6464883a44756
For our new ci config process:
https://firefox-source-docs.mozilla.org/testing/ci-configs/index.html
we will want to run a backlog job for just the tests that fail on the new config. So if we stand up a new apple_silicon config, then all tests that are not expected-pass will run in the backlog job. Similar to the wpt tests, we will need:
- in config.yml create a test group (X-b if we want to reuse backlog or X-f if we want to use failures)
- in test-sets.yml create a test-set (either xpcshell-backlog or xpcshell-failures)
- in xpcshell.yml add a xpcshell-backlog or xpcshell-failures suite entry; here you will add mozharness extra args (mochitest example: https://searchfox.org/mozilla-central/source/taskcluster/ci/test/mochitest.yml#263 ), which will be --run-failures <keyword>
- intentionally keep jobs running by default on try, do not hide in target_tasks.py::TARGET_TASK_BLACKLIST
- in taskgraph/transforms/tests.py, add the new suite xpcshell-failures|backlog to CHUNK_SUITES_BLACKLIST (so we don't assume run by manifest)
- in mozharness::desktop_unittest.py (https://searchfox.org/mozilla-central/source/testing/mozharness/scripts/desktop_unittest.py#61 ), add a config option for --run-failures which will take an argument of <keyword>, make it extend, so we could pass in multiple calls (only if not done in bug 1682358)
- also in mozharness::desktop_unittest.py (https://searchfox.org/mozilla-central/source/testing/mozharness/scripts/desktop_unittest.py#580 ), append your parameters to the base_cmd so when calling the mochitest harness it has --run-failures <keyword>
- in xpcshellcommandline.py ( https://searchfox.org/mozilla-central/source/testing/xpcshell/xpcshellcommandline.py#12 ), add an argument for --run-failures <keyword> that can be appended to for multiple keywords
- in runxpcshelltests.py ( https://searchfox.org/mozilla-central/source/testing/xpcshell/runxpcshelltests.py#1035 ), modify this to get all tests that match only they keyword(s) you are looking for
- NOTE: this might be tricky and could use some engineering thought; do we modify manifest.active_tests to add a flag or support only failing tests with keywords, or find manifest.failing_tests(filters)
- NOTE: this might be a similar solution to Bug 1682358
- in runxpcshelltests.py confirm that expect_pass = False will report properly in treeherder.
- NOTE: possibly in Assert.jsm (the testing-commong library: https://searchfox.org/mozilla-central/source/testing/modules/Assert.jsm ), find a way to make equal/is/ok/etc. accept failures - 99% sure this is not needed
While this is a lot, it will not handle everything. For example:
assertions (in debug)
timeouts
crashes
I would like to document any edge cases outside of this bug, this is probably a hole in my strategy.
One other piece of the puzzle is how we support >1 configuration at a time. For example, if we had apple_silicon and windows_1903.
Comment 1•5 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #0)
While this is a lot, it will not handle everything. For example:
assertions (in debug)
timeouts
crashes
I believe every xpcshell test runs in a new xpcshell process, so there may be minimal difficulties in this area, for xpcshell test.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
I have submitted a patch at:
https://phabricator.services.mozilla.com/D101662
| Assignee | ||
Comment 3•4 years ago
|
||
add support to xpcshell harness + mozharess for --run-failures
Comment 5•4 years ago
|
||
| bugherder | ||
Description
•