summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-09-07 22:47:07 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-09-07 22:47:50 +0200
commit279f745a60f0937047b8e441347dfb98a9d97cf9 (patch)
tree40c277475c499ebd3ebb837f02c03fa64a15f317
parenteef85229d0fe9f69d325aa0231e592f35c468afb (diff)
downloadphp-git-279f745a60f0937047b8e441347dfb98a9d97cf9.tar.gz
Fix reporting of redirect test failures in junit
These were being reported under the wrong name ... which means that they don't show up as failures on azure :(
-rwxr-xr-xrun-tests.php6
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';
}