diff --git a/benchmark/find_slow_tests.php b/benchmark/find_slow_tests.php new file mode 100644 index 0000000000000..afa0c9ffdaa66 --- /dev/null +++ b/benchmark/find_slow_tests.php @@ -0,0 +1,62 @@ +getExtension() !== 'phpt') { + continue; + } + $test_files[] = $file->getPathname(); + } + return $test_files; +})(); +$results_raw = []; +$cmd_template = implode(" ", array( + escapeshellarg($php_binary), + escapeshellarg(realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'run-tests.php']))), +// '-p ' . escapeshellarg($php_binary), + '--no-color', + '--no-progress', + '-q', + '-x', // SKIP_SLOW_TESTS + '', +)); +$total = count($test_files); +$null_path = IS_WINDOWS ? 'NUL' : '/dev/null'; // funfact, on Windows, every single directory has a null device file named "NUL" ... +foreach ($test_files as $test_no => $test_file) { + $test_file_relative = substr($test_file, $php_src_dir_relative_cutoff); + echo "Running test " . ($test_no + 1) . "/{$total}: {$test_file_relative}\n"; + $best_time = INF; + $cmd = $cmd_template . escapeshellarg($test_file) . " > {$null_path} 2>&1"; + for ($testrun = 0; $testrun < 3; ++$testrun) { + $start = microtime(true); + passthru($cmd); + $end = microtime(true); + $best_time = min($best_time, $end - $start); + } + echo "Best time: {$best_time}s\n"; + $results_raw[$test_file_relative] = $best_time; +} +$results_sorted = $results_raw; +arrsort($results_sorted, SORT_NUMERIC); +var_export($results_sorted); diff --git a/ext/curl/tests/bug48203_multi.phpt b/ext/curl/tests/bug48203_multi.phpt index 19077147a611e..28797cc7541c4 100644 --- a/ext/curl/tests/bug48203_multi.phpt +++ b/ext/curl/tests/bug48203_multi.phpt @@ -2,6 +2,13 @@ Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec) --EXTENSIONS-- curl +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- 0) die("skip couldn't locate openssl binary"); diff --git a/ext/pdo_sqlite/tests/common.phpt b/ext/pdo_sqlite/tests/common.phpt index 8cf728c371b3b..406034232a18c 100644 --- a/ext/pdo_sqlite/tests/common.phpt +++ b/ext/pdo_sqlite/tests/common.phpt @@ -2,6 +2,13 @@ SQLite --EXTENSIONS-- pdo_sqlite +--SKIPIF-- + --REDIRECTTEST-- return array( 'ENV' => array( diff --git a/ext/standard/tests/general_functions/proc_open_pipes1.phpt b/ext/standard/tests/general_functions/proc_open_pipes1.phpt index 9822607c6f7ef..97ac7060e1310 100644 --- a/ext/standard/tests/general_functions/proc_open_pipes1.phpt +++ b/ext/standard/tests/general_functions/proc_open_pipes1.phpt @@ -1,5 +1,12 @@ --TEST-- proc_open() with > 16 pipes +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE--