Closed Bug 2092741 Opened 12 days ago Closed 7 days ago

Mochitests are silently skipped after the browser exits in the middle of a manifest with --repeat, or while retrying failed tests

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

In automation, when the browser exits in the middle of a manifest (a timeout, a hang, a crash), MochitestDesktop.runMochitests in testing/mochitest/runtests.py starts a new browser for the tests that did not get to run. It picks them with testsToRun[self.tests_started:], but tests_started counts test_start messages. With --repeat=1 every test starts twice, so the harness skips about as many tests as had already run, and drops the rest of the manifest once that index reaches its end. Nothing reports the tests that never ran. In try pushes of the mochitest repeat tasks (bug 2029980), 712 browser-chrome and 365 devtools test runs never happened this way.

The retry of tests that failed during the initial run has no resume at all: when a retried test ends the session, the failed tests after it are neither rerun nor reported. This also happens without --repeat.

The patch edits the same code as the one in bug 2090907, which makes the status of a session that ended early survive the session resumed after it.

Resuming skipped as many tests as had already started, so with --repeat it
could drop the rest of the manifest. The retry of failed tests had no resume
at all: when a retried test ended the session, the failed tests after it were
neither rerun nor reported. With --restart-after-failure, every failed test is
now retried, instead of stopping at the first one that fails again.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2a577d122043 https://hg.mozilla.org/integration/autoland/rev/b3da2d7d9f18 Resume mochitests after a session ends early with the tests that did not start, also when retrying failures, r=ahal.
Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: