Open benniledl opened 7 months ago
different log verbosity
root@host50:/var/home/user/wp-tests/phpunit-test-runner# php report.php
Environment variables pass checks.
Getting SVN Revision
Getting SVN message
Copying junit.xml results
rsync -rv '/var/home/user/wp-tests/wp-env'/tests/phpunit/build/logs/* '/var/home/user/wp-tests/wp-env'
sending incremental file list
env.json
sent 1,964 bytes received 35 bytes 3,998.00 bytes/sec
total size is 1,872 speedup is 0.94
Processing and uploading junit.xml
Warning: file_get_contents(/var/home/user/wp-tests/wp-env/junit.xml): Failed to open stream: No such file or directory in /var/home/user/wp-tests/phpunit-test-runner/report.php on line 124
Error: Error uploading results: Invalid parameter(s): results (HTTP status 400)
Same issue affecting us as well. Tested in few different environments with the actual test passing without errors.
I just tried this on my local computer and experience the same results. When I look at the location that the readme indicates should hold the junit.xml
file, the only thing I see is the env.json
:
★ trunk* build/logs % pwd
/tmp/wp-test-runner/tests/phpunit/build/logs
★ trunk* build/logs % ls -alh
total 16
drwxr-xr-x@ 3 ben.turner wheel 96B Jun 26 07:59 .
drwxr-xr-x@ 3 ben.turner wheel 96B Jun 26 07:59 ..
-rw-r--r--@ 1 ben.turner wheel 5.7K Jun 26 08:24 env.json
Looking closer at the test.php
file, I think it might have something to do with generating a shell command in PHP and how the args are escaped:
https://github.com/wordpress/phpunit-test-runner/blob/master/test.php#L74
As a test, I changed the WPT_FLAVOR
variable in the .env
file from 1
to 0
and re-ran the tests. This correctly generated the `junit.xml file.
https://github.com/wordpress/phpunit-test-runner/blob/master/.env.default#L71
★ trunk* /tmp/wp-test-runner % ls tests/phpunit/build/logs
env.json junit.xml
I can't tinker on this more at the moment, but my gut says the way that the WPT_PHPUNIT_CMD
variable is built up needs some work.
this should fix it: https://github.com/WordPress/wordpress-develop/commit/592dd4f7566fe24050a3c1fa5c5618ca4e873d0d
@bgturner @javiercasares @Tuomas-dev
The junit.xml file is not generated and thus I cannot report the results back to wp.org