Closed
Bug 1291335
Opened 9 years ago
Closed 7 years ago
Check for --disable-tests when running mach test commands
Categories
(Testing :: General, defect)
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: egao)
References
Details
Attachments
(1 file, 3 obsolete files)
I can't run xpcshell-test
When I attempt to run the example from [0]:
`./mach xpcshell-test netwerk/test/`
I'm getting a failure with 0 tests run.
When I attempt to run full `./mach xpcshell-test`, I'm getting https://pastebin.mozilla.org/8888902
I asked :stas to try the same commands and he's getting the same errors, so it's not specific to my machine, but since we're both on Linux it may be linux specific.
[0] https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests#Your_first_xpcshell-based_test
Reporter | ||
Comment 2•9 years ago
|
||
Much to my surprise, removing "--disable-tests" from mozconfig fixed this issue. Magic.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(gps)
Resolution: --- → INVALID
Comment 3•9 years ago
|
||
We should definitely error if you try to run a mach test command with --disable-tests.
Updated•9 years ago
|
Component: XPCShell Harness → General
Summary: Can't launch xpschell-test → Check for --disable-tests when running mach test commands
Updated•9 years ago
|
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → egao
Assignee | ||
Comment 4•7 years ago
|
||
- implemented a mozconfig checker inside runxpcshelltests.py::XPCShellTests::runTests, which checks the build.mozconfig['configure_args'] for --disable-tests option.
- changed runspcshelltest.py::XPCShellTests::buildTestList to clearly print error then exit, with additional error message hinting at --disable-tests flag. This is to cover case where compilation was done with --disable-tests flag, but user attempts to run tests by mnaually specifying another mozconfig that does not have --disable-tests flag.
Assignee | ||
Comment 5•7 years ago
|
||
- debugging statements to run on try server
Depends on D7130
Assignee | ||
Comment 6•7 years ago
|
||
- further debug statements
Depends on D7131
Assignee | ||
Comment 7•7 years ago
|
||
- restored check for build.mozconfig.configure_args value, surrounded by checks to ensure it does not fail in automation environment
Depends on D7132
Updated•7 years ago
|
Attachment #9012708 -
Attachment is obsolete: true
Updated•7 years ago
|
Attachment #9012707 -
Attachment is obsolete: true
Updated•7 years ago
|
Attachment #9012709 -
Attachment is obsolete: true
Assignee | ||
Comment 8•7 years ago
|
||
Try run for the patch, covering xpcshelltests:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=82e30399c06359403afa6ae51460489404e5c4c0
![]() |
||
Comment 9•7 years ago
|
||
Thanks for taking this :egao. It looks like you are on the right track here.
I think you could put your check in either mach_commands.py or the test harness - your choice. Hopefully you can apply your solution to all of the mach test commands/harnesses: mach test, web-platform-test, mochitest, reftest, xpcshell-test, etc.
Assignee | ||
Comment 10•7 years ago
|
||
An updated try run with a revised patch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=45fb4eac5374e6623c3cf27bd41649b4474c471a
Revised patch details:
1. patch from comment 7 worked only for xpcshelltest, when invoked by: ./mach xpcshell-test <test_name>.
The revised patch removes this change, restoring testing/xpcshell/mach_commands.py to default state.
2. newer patch works at mozilla-central/python/mach/mach/main.py. As the arguments are parsed and appropriate flags are set, additional checks are done using the following criteria in order:
- if MOZCONFIG environment variable is present;
- if MOZCONFIG specified in environment contains '--disable-tests' flag;
- if mach contains 'test' subcommand;
- if mach command contains 'test' in the cli argument; then
- a message stating that tests are disabled is shown.
I have checked the patch locally with the following commands:
./mach try
./mach bootstrap
./mach mochitest
./mach test mochitest
./mach xpcshell-test
./mach test xpcshell
./mach --help
./mach try
Updated•7 years ago
|
Attachment #9012710 -
Attachment description: Bug 1291335 - Check for --disable-tests when running mach test commands r?gbrown → Bug 1291335 - Check mozconfig for --disable-tests when running mach test commands r?gbrown
Comment 11•7 years ago
|
||
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b58cfd180ba7
Check mozconfig for --disable-tests when running mach test commands r=gbrown
Comment 12•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 9 years ago → 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•