Closed Bug 2026006 Opened 4 months ago Closed 4 months ago

`--restart-between-tests` doesn't support `test-directories` and `profile-path` manifest directives

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

When running mochitest with --restart-between-tests, the test-directories and profile-path manifest directives are not properly handled across browser restarts.

test-directories were created once in runTests before the restart loop, then removed by cleanup() after each test, and never re-created for subsequent tests. Similarly, profile-path was set once in runTests but reset to None by initializeLooping() on each restart.

The fix moves the parseAndCreateTestsDirs call and profile-path setup from runTests into doTests, so they run on every iteration of the restart loop.

Reproduces locally with:
./mach test security/sandbox/test/browser_content_sandbox_fs_xdg_xdgConfigHome.js --restart-between-tests --headless

Which fails with:
TEST-UNEXPECTED-FAIL | security/sandbox/test/browser_content_sandbox_fs_xdg_xdgConfigHome.js | bound setup - Profile directory (/tmp/tmpk09i_8hd.mozrunner) should be inside XDG_CONFIG_HOME (/tmp/.xdg_config_home_test) - false == true

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5d837b8566c2 https://hg.mozilla.org/integration/autoland/rev/f29c25892907 Move test-directories and profile-path setup from runTests into doTests so they work with --restart-between-tests, r=ahal.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: