Skip to content

Commit 42b9acd

Browse files
committed
Show slow SKIPIF sections as well
1 parent 5639675 commit 42b9acd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

run-tests.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,11 +2210,23 @@ function run_test(string $php, $file, array $env): string
22102210

22112211
junit_start_timer($shortname);
22122212

2213+
$startTime = microtime(true);
22132214
$output = system_with_timeout("$extra $php $pass_options $extra_options -q $orig_ini_settings $no_file_cache -d display_errors=1 -d display_startup_errors=0 \"$test_skipif\"", $env);
22142215
$output = trim($output);
2216+
$time = microtime(true) - $startTime;
22152217

22162218
junit_finish_timer($shortname);
22172219

2220+
if ($time > $slow_min_ms / 1000) {
2221+
$PHP_FAILED_TESTS['SLOW'][] = [
2222+
'name' => $file,
2223+
'test_name' => 'SKIPIF of ' . $tested . " [$tested_file]",
2224+
'output' => '',
2225+
'diff' => '',
2226+
'info' => $time,
2227+
];
2228+
}
2229+
22182230
if (!$cfg['keep']['skip']) {
22192231
@unlink($test_skipif);
22202232
}
@@ -2524,7 +2536,7 @@ function run_test(string $php, $file, array $env): string
25242536
if ($time >= $slow_min_ms * 1000000) {
25252537
$PHP_FAILED_TESTS['SLOW'][] = [
25262538
'name' => $file,
2527-
'test_name' => (is_array($IN_REDIRECT) ? $IN_REDIRECT['via'] : '') . $tested . " [$tested_file]",
2539+
'test_name' => $tested . " [$tested_file]",
25282540
'output' => '',
25292541
'diff' => '',
25302542
'info' => $time / 1000000000,

0 commit comments

Comments
 (0)