From 26e0d389bc630736dcb24405bd46e352fea36766 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 25 Aug 2020 14:53:18 +0200 Subject: Show slow SKIPIF sections as well --- run-tests.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'run-tests.php') diff --git a/run-tests.php b/run-tests.php index 3c1bf56149..a9f56f9484 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2210,11 +2210,23 @@ TEST $file junit_start_timer($shortname); + $startTime = microtime(true); $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); $output = trim($output); + $time = microtime(true) - $startTime; junit_finish_timer($shortname); + if ($time > $slow_min_ms / 1000) { + $PHP_FAILED_TESTS['SLOW'][] = [ + 'name' => $file, + 'test_name' => 'SKIPIF of ' . $tested . " [$tested_file]", + 'output' => '', + 'diff' => '', + 'info' => $time, + ]; + } + if (!$cfg['keep']['skip']) { @unlink($test_skipif); } @@ -2524,7 +2536,7 @@ COMMAND $cmd if ($time >= $slow_min_ms * 1000000) { $PHP_FAILED_TESTS['SLOW'][] = [ 'name' => $file, - 'test_name' => (is_array($IN_REDIRECT) ? $IN_REDIRECT['via'] : '') . $tested . " [$tested_file]", + 'test_name' => $tested . " [$tested_file]", 'output' => '', 'diff' => '', 'info' => $time / 1000000000, -- cgit v1.2.1