Describe the bug
When an SSH connection is configured for the runner, the $junit_location is passed through escapeshellarg() twice. This results in a the following error:
rsync: [sender] change_dir "/home4/USERNAME/'wp-test-runner-80'/tests/phpunit/build/logs" failed: No such file or directory (2)
The actual command that's run is rsync -r -e "ssh " 'USERNAME@HOST:'\''wp-test-runner-80'\''/tests/phpunit/build/logs/*' '/tmp/wp-test-runner'. Note the excessive single quotations in the path.
To Reproduce
Steps to reproduce the behavior:
- Configure the runner to run using an SSH connection
- Run the
prepare.php and test.php scripts.
- Confirm that the
tests/phpunit/build/logs directory is present and contains a junit.xml and env.json file.
- Run the
report.php script to see the error.
Expected behavior
The entire path should be enclosed in quotes once.
Screenshots

Describe the bug
When an SSH connection is configured for the runner, the
$junit_locationis passed throughescapeshellarg()twice. This results in a the following error:rsync: [sender] change_dir "/home4/USERNAME/'wp-test-runner-80'/tests/phpunit/build/logs" failed: No such file or directory (2)The actual command that's run is
rsync -r -e "ssh " 'USERNAME@HOST:'\''wp-test-runner-80'\''/tests/phpunit/build/logs/*' '/tmp/wp-test-runner'. Note the excessive single quotations in the path.To Reproduce
Steps to reproduce the behavior:
prepare.phpandtest.phpscripts.tests/phpunit/build/logsdirectory is present and contains ajunit.xmlandenv.jsonfile.report.phpscript to see the error.Expected behavior
The entire path should be enclosed in quotes once.
Screenshots