Closed Bug 1332573 Opened 7 years ago Closed 7 years ago

Can't run mochitest with "--tag"

Categories

(Testing :: Mochitest, defect)

Version 3
defect
Not set
normal

Tracking

(firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: alwu, Assigned: ahal)

References

Details

Attachments

(1 file)

I've tried different kinds of tag names, and all of them can't be executed successfully.

Can be reproduced on Nightly, and both on OSX and Linux.

---

Error running mach:

    ['mochitest', '--tag', 'audiochannel']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

UnboundLocalError: local variable 'status' referenced before assignment

  File "/Users/Alastor/mozilla-central/testing/mochitest/mach_commands.py", line 408, in run_mochitest_general
    **harness_args)
  File "/Users/Alastor/mozilla-central/testing/mochitest/mach_commands.py", line 158, in run_desktop_test
    result = mochitest.run_test_harness(parser, options)
  File "/Users/Alastor/build_mc_obj/_tests/testing/mochitest/runtests.py", line 2711, in run_test_harness
    result = runner.runTests(options)
  File "/Users/Alastor/build_mc_obj/_tests/testing/mochitest/runtests.py", line 2228, in runTests
    return self.runMochitests(options, testsToRun)
  File "/Users/Alastor/build_mc_obj/_tests/testing/mochitest/runtests.py", line 2167, in runMochitests
    result = self.doTests(options, testsToRun)
  File "/Users/Alastor/build_mc_obj/_tests/testing/mochitest/runtests.py", line 2478, in doTests
I think this was regressed by bug 1286312. Once I get mochitest selftests running, I'll make sure a test is added for --tag.
Assignee: nobody → ahalberstadt
Blocks: 1286312
Status: NEW → ASSIGNED
Comment on attachment 8828811 [details]
Bug 1332573 - Always set status in mochitest even if no tests were found,

https://reviewboard.mozilla.org/r/106104/#review107376
Attachment #8828811 - Flags: review?(pyang) → review+
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c61b0e70d0cf
Always set status in mochitest even if no tests were found, r=pyang
https://hg.mozilla.org/mozilla-central/rev/c61b0e70d0cf
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
See Also: → 1377564
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: