Closed Bug 875382 Opened 11 years ago Closed 11 years ago

mach mochitest should exit with non-0 status code if tests fail

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla24

People

(Reporter: gps, Assigned: gps)

References

(Blocks 1 open bug)

Details

(Whiteboard: [mach])

Attachments

(1 file)

mach currently exits with the status code returned by the test runner. This is the status code returned by the app. testsuite-targets.mk greps over process output and exits with 1 if there was a test failure. mach should do the same.
Not sure if it's obvious from the diff context, but test_output is the
filtered output of all unexpected messages. If there is a test failure,
test_output will be defined.
Attachment #753342 - Flags: review?(Ms2ger)
Assignee: nobody → gps
We could (and maybe should) push this down into the Mochitest harness code, so that runTests returns the proper status for success or failure, and then mach could just exit with that.
Comment on attachment 753342 [details] [diff] [review]
mach mochitest-* now emits proper exit code on test failure

Review of attachment 753342 [details] [diff] [review]:
-----------------------------------------------------------------

This should eventually be in runtests.py, along with the UNEXPECTED grepping, but this works for now.
Attachment #753342 - Flags: review?(Ms2ger) → review+
Verified this stops now on a unexpected failure
Blocks: 875388
https://hg.mozilla.org/integration/mozilla-inbound/rev/43886dce099a
Status: NEW → ASSIGNED
Flags: in-testsuite-
Target Milestone: --- → mozilla24
https://hg.mozilla.org/mozilla-central/rev/43886dce099a
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: