You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running tests as a multisite fails to submit testing report #267
Describe the bug
When the test runner is configured to run the unit test suite as a multisite, the results will not be submitted successfully because no junit.xml file is produced.
I've opened a ticket upstream in Core Trac, but I'm creating this to follow up once that's addressed, and to consider any other functional differences when running the tests as a multisite install.
To Reproduce
Steps to reproduce the behavior:
Prepare and run the test runner with WPT_FLAVOR=1.
Run the reporting script.
Observe a failure.
Inspect the tests/phpunit/build/logs directory and see that there is no junit.xml file.
Confirmed fixed on trunk, but it took a follow-up, not just r60781.
test.php runs multisite as phpunit -c tests/phpunit/multisite.xml, and report.php reads tests/phpunit/build/logs/junit.xml. PHPUnit resolves a <log>target relative to the config file's own directory (tests/phpunit/).
r60781 added the log with target="tests/phpunit/build/logs/junit.xml", which resolves to tests/phpunit/tests/phpunit/build/logs/junit.xml (a doubled path). report.php never finds it there, so multisite reporting still fails.
r62464 (#64894, "Correct the Multisite PHPUnit log path") changed it to target="build/logs/junit.xml", which resolves to tests/phpunit/build/logs/junit.xml, where report.php looks.
Reproduced both with PHPUnit 9.6 and a one-test suite, config in tests/phpunit/ run from the repo root as the runner does. The r60781 path writes to the doubled location (report aborts). The r62464 path writes where report.php reads (report succeeds). So this is resolved on current trunk. Just confirm any test build is at or after r62464, since r60781 by itself does not do it.
AI Assisted Claude Code helped test the multisite log path, confirming r60781 alone missed the path and r62464 corrected it.
Activity
Build/Test Tools: Configure logging for PHPUnit and multisite.
Build/Test Tools: Configure logging for PHPUnit and multisite.
Build/Test Tools: Configure logging for PHPUnit and multisite.
desrosj commentedon Sep 18, 2025
This was merged in r60781, but needs some testing to confirm.
Build/Test Tools: Configure logging for PHPUnit and multisite.
chrisdavidmiles commentedon Oct 14, 2026
Confirmed fixed on trunk, but it took a follow-up, not just r60781.
test.phpruns multisite asphpunit -c tests/phpunit/multisite.xml, andreport.phpreadstests/phpunit/build/logs/junit.xml. PHPUnit resolves a<log>targetrelative to the config file's own directory (tests/phpunit/).target="tests/phpunit/build/logs/junit.xml", which resolves totests/phpunit/tests/phpunit/build/logs/junit.xml(a doubled path).report.phpnever finds it there, so multisite reporting still fails.target="build/logs/junit.xml", which resolves totests/phpunit/build/logs/junit.xml, wherereport.phplooks.Reproduced both with PHPUnit 9.6 and a one-test suite, config in
tests/phpunit/run from the repo root as the runner does. The r60781 path writes to the doubled location (report aborts). The r62464 path writes wherereport.phpreads (report succeeds). So this is resolved on current trunk. Just confirm any test build is at or after r62464, since r60781 by itself does not do it.AI AssistedClaude Code helped test the multisite log path, confirming r60781 alone missed the path and r62464 corrected it.