Closed
Bug 1197541
Opened 10 years ago
Closed 10 years ago
Add --dump-tests option in mochitest/xpcshell for all tests that will be run
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(firefox43 fixed)
RESOLVED
FIXED
mozilla43
| Tracking | Status | |
|---|---|---|
| firefox43 | --- | fixed |
People
(Reporter: vaibhav1994, Assigned: vaibhav1994)
References
Details
Attachments
(1 file)
From https://bugzilla.mozilla.org/show_bug.cgi?id=1197318#c4:
ahal:
I'd propose adding a --dump-tests option to mochitest. When this option is passed in, at the end of mochitest.active_tests, instead of returning, it would save the tests that would be run to a file and immediately call sys.exit(). This way, chunk-finder could invoke the harness with whatever command line is being used in automation, with the addition of --dump-tests. It could then scan the files for the missing test. This has the benefit of always being up to date with the right configuration.
You could similarly add a --dump-tests option to xpcshell as well. As another bonus, this approach could work with test harnesses that don't use manifestparser, like reftest.
| Assignee | ||
Updated•10 years ago
|
Summary: Add --dump-tests option in mochitest/xpcshell to dump the active_tests run → Add --dump-tests option in mochitest/xpcshell for all tests that will be run
| Assignee | ||
Comment 1•10 years ago
|
||
Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Attachment #8651437 -
Flags: review?(ahalberstadt)
| Assignee | ||
Comment 2•10 years ago
|
||
Andrew, in the review active_tests.json will be dumped to:
* /{obj_dir}/_tests/testing/mochitest/active_tests.json for mochitests
* /testing/xpcshell/active_tests.json for xpcshell (since there is no self.topobjdir present in it)
Let me know if the paths will be fine or if I need to change them.
Updated•10 years ago
|
Attachment #8651437 -
Flags: review?(ahalberstadt)
Comment 3•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
https://reviewboard.mozilla.org/r/16945/#review15159
Thanks, looks good. Just some minor comments to address.
::: testing/mochitest/mochitest_options.py:327
(Diff revision 1)
> + "help": "Dump all the tests that will be run to active_tests.json",
I think we should add "suppress": True here. Alone it isn't that useful for finding chunks because users still need to dig through the file. So might as well hide it from the help menu.
::: testing/mochitest/runtests.py:1982
(Diff revision 1)
> + active_tests_path = os.path.join(SCRIPT_DIR, 'active_tests.json')
Instead of hardcoding a path, let's just require the path on the command line. That way you can invoke the harness with --dump-tests multiple times without overwriting the file.
| Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Attachment #8651437 -
Flags: review?(ahalberstadt)
| Assignee | ||
Comment 5•10 years ago
|
||
Andrew, I have also added --dump-tests to mach for xpcshell-test since now it accepts filename, and it wouldn't make sense if we can't pass it through mach.
Comment 6•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
https://reviewboard.mozilla.org/r/16945/#review15271
A general nit throughout:
Please update from camelcase to underscores for new variable names. I know it's already a mix of both, but new variables should be underscored.
But with that fixed, looks good!
::: testing/mochitest/runtests.py:1982
(Diff revision 2)
> + # Allow user to use shorthand '~' to home directory
nit: this comment isn't necessary
::: testing/xpcshell/runxpcshelltests.py:832
(Diff revision 2)
> + # Allow user to use shorthand '~' to home directory
nit: comment not necessary
Attachment #8651437 -
Flags: review?(ahalberstadt) → review+
| Assignee | ||
Updated•10 years ago
|
Attachment #8651437 -
Flags: review+ → review?(ahalberstadt)
| Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
| Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
| Assignee | ||
Comment 9•10 years ago
|
||
| Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8651437 [details]
MozReview Request: Bug 1197541 - Added --dump-tests option to mochitest and xpcshell for all tests that will be run. r=ahal
Carrying forward the r+
Attachment #8651437 -
Flags: review?(ahalberstadt) → review+
| Assignee | ||
Comment 11•10 years ago
|
||
Try run passes (even though this patch does not require a try run).
Assignee: nobody → vaibhavmagarwal
Keywords: checkin-needed
Comment 12•10 years ago
|
||
Keywords: checkin-needed
Comment 13•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•