diff options
-rwxr-xr-x | run-tests.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php index 2104ab2a64..89525f518b 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2037,6 +2037,7 @@ TEST $file if (is_array($IN_REDIRECT)) { $tested = $IN_REDIRECT['prefix'] . ' ' . trim($section_text['TEST']); $tested_file = $tmp_relative_file; + $shortname = str_replace(TEST_PHP_SRCDIR . '/', '', $tested_file); } // unlink old test results @@ -2722,7 +2723,8 @@ COMMAND $cmd // write .diff $diff = generate_diff($wanted, $wanted_re, $output); if (is_array($IN_REDIRECT)) { - $diff = "# original source file: $shortname\n" . $diff; + $orig_shortname = str_replace(TEST_PHP_SRCDIR . '/', '', $file); + $diff = "# original source file: $orig_shortname\n" . $diff; } show_file_block('diff', $diff); if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, $diff, FILE_BINARY) === false) { @@ -2769,7 +2771,7 @@ $output $diff = empty($diff) ? '' : preg_replace('/\e/', '<esc>', $diff); - junit_mark_test_as($restype, str_replace(TEST_PHP_SRCDIR . '/', '', $tested_file), $tested, null, $info, $diff); + junit_mark_test_as($restype, $shortname, $tested, null, $info, $diff); return $restype[0] . 'ED'; } |