@@ -2037,6 +2037,7 @@ function run_test($php, $file, $env)
2037
2037
if (is_array ($ IN_REDIRECT )) {
2038
2038
$ tested = $ IN_REDIRECT ['prefix ' ] . ' ' . trim ($ section_text ['TEST ' ]);
2039
2039
$ tested_file = $ tmp_relative_file ;
2040
+ $ shortname = str_replace (TEST_PHP_SRCDIR . '/ ' , '' , $ tested_file );
2040
2041
}
2041
2042
2042
2043
// unlink old test results
@@ -2722,7 +2723,8 @@ function run_test($php, $file, $env)
2722
2723
// write .diff
2723
2724
$ diff = generate_diff ($ wanted , $ wanted_re , $ output );
2724
2725
if (is_array ($ IN_REDIRECT )) {
2725
- $ diff = "# original source file: $ shortname \n" . $ diff ;
2726
+ $ orig_shortname = str_replace (TEST_PHP_SRCDIR . '/ ' , '' , $ file );
2727
+ $ diff = "# original source file: $ orig_shortname \n" . $ diff ;
2726
2728
}
2727
2729
show_file_block ('diff ' , $ diff );
2728
2730
if (strpos ($ log_format , 'D ' ) !== false && file_put_contents ($ diff_filename , $ diff , FILE_BINARY ) === false ) {
@@ -2769,7 +2771,7 @@ function run_test($php, $file, $env)
2769
2771
2770
2772
$ diff = empty ($ diff ) ? '' : preg_replace ('/\e/ ' , '<esc> ' , $ diff );
2771
2773
2772
- junit_mark_test_as ($ restype , str_replace ( TEST_PHP_SRCDIR . ' / ' , '' , $ tested_file ) , $ tested , null , $ info , $ diff );
2774
+ junit_mark_test_as ($ restype , $ shortname , $ tested , null , $ info , $ diff );
2773
2775
2774
2776
return $ restype [0 ] . 'ED ' ;
2775
2777
}
0 commit comments