File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4949 * safely used in shell commands.
5050 */
5151log_message ('Copying junit.xml results ' );
52- $ junit_location = escapeshellarg ( $ runner_vars ['WPT_TEST_DIR ' ] ) . '/tests/phpunit/build/logs/* ' ;
52+ $ junit_location = $ runner_vars ['WPT_TEST_DIR ' ] . '/tests/phpunit/build/logs/* ' ;
5353
5454/**
5555 * Modifies the junit.xml results file path for a remote location if an SSH connection is available.
5858 * command and options for accessing the remote file system. It concatenates SSH options with the
5959 * remote path to ensure that the junit.xml results can be accessed or copied over SSH.
6060 */
61- if ( ! empty ( $ runner_vars [ ' WPT_SSH_CONNECT ' ] ) ) {
62- $ junit_location = '-e "ssh ' . $ runner_vars ['WPT_SSH_OPTIONS ' ] . '" ' . escapeshellarg ( $ runner_vars ['WPT_SSH_CONNECT ' ] . ': ' . $ junit_location );
61+ if ( ! empty ( $ WPT_SSH_CONNECT ) ) {
62+ $ junit_location = '-e "ssh ' . $ runner_vars ['WPT_SSH_OPTIONS ' ] . '" ' . escapeshellarg ( $ runner_vars ['WPT_SSH_CONNECT ' ] ) . ': ' . escapeshellarg ( $ junit_location );
6363}
6464
6565/**
Original file line number Diff line number Diff line change 6565 * avoid reporting useless tests.
6666 */
6767$ WPT_PHPUNIT_CMD = trim ( getenv ( 'WPT_PHPUNIT_CMD ' ) );
68- if ( empty ( $ WPT_PHPUNIT_CMD ) ) {
69- $ WPT_PHPUNIT_CMD = 'cd ' . escapeshellarg ( $ runner_vars ['WPT_TEST_DIR ' ] ) . ' && ' . $ runner_vars ['WPT_PHP_EXECUTABLE ' ] . ' ./vendor/phpunit/phpunit/phpunit --dont-report-useless-tests ' . $ WPT_FLAVOR_TXT . $ WPT_EXTRATESTS_TXT ;
68+ if ( empty ( $ WPT_PHPUNIT_CMD ) ) {
69+ $ WPT_PHPUNIT_CMD = escapeshellarg ( 'cd ' . $ runner_vars ['WPT_TEST_DIR ' ] ) . ' && ' . $ runner_vars ['WPT_PHP_EXECUTABLE ' ] . ' ./vendor/phpunit/phpunit/phpunit --dont-report-useless-tests ' . $ WPT_FLAVOR_TXT . $ WPT_EXTRATESTS_TXT );
70+ } else {
71+ $ WPT_PHPUNIT_CMD = escapeshellarg ( $ WPT_PHPUNIT_CMD );
7072}
7173
7274// If an SSH connection string is provided, prepend the SSH command to the PHPUnit execution command.
7375if ( ! empty ( $ runner_vars ['WPT_SSH_CONNECT ' ] ) ) {
74- $ WPT_PHPUNIT_CMD = 'ssh ' . $ runner_vars ['WPT_SSH_OPTIONS ' ] . ' ' . escapeshellarg ( $ runner_vars ['WPT_SSH_CONNECT ' ] ) . ' ' . escapeshellarg ( $ WPT_PHPUNIT_CMD ) ;
76+ $ WPT_PHPUNIT_CMD = 'ssh ' . $ runner_vars ['WPT_SSH_OPTIONS ' ] . ' ' . escapeshellarg ( $ runner_vars ['WPT_SSH_CONNECT ' ] ) . ' ' . $ WPT_PHPUNIT_CMD ;
7577}
7678
7779// Execute the PHPUnit command.
You can’t perform that action at this time.
0 commit comments