mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n]
This commit is contained in:
commit
85533e741a
@ -103,12 +103,12 @@ Options:
|
||||
Do not delete 'all' files, 'php' test file, 'skip' or 'clean'
|
||||
file.
|
||||
|
||||
--set-timeout [n]
|
||||
--set-timeout <n>
|
||||
Set timeout for individual tests, where [n] is the number of
|
||||
seconds. The default value is 60 seconds, or 300 seconds when
|
||||
testing for memory leaks.
|
||||
|
||||
--context [n]
|
||||
--context <n>
|
||||
Sets the number of lines of surrounding context to print for diffs.
|
||||
The default value is 3.
|
||||
|
||||
@ -119,7 +119,7 @@ Options:
|
||||
'mem'. The result types get written independent of the log format,
|
||||
however 'diff' only exists when a test fails.
|
||||
|
||||
--show-slow [n]
|
||||
--show-slow <n>
|
||||
Show all tests that took longer than [n] milliseconds to run.
|
||||
|
||||
--no-clean Do not execute clean section if any.
|
||||
@ -530,7 +530,11 @@ function main(): void
|
||||
$just_save_results = true;
|
||||
break;
|
||||
case '--set-timeout':
|
||||
$environment['TEST_TIMEOUT'] = $argv[++$i];
|
||||
$timeout = $argv[++$i] ?? '';
|
||||
if (!preg_match('/^\d+$/', $timeout)) {
|
||||
error("'$timeout' is not a valid number of seconds, try e.g. --set-timeout 60 for 1 minute");
|
||||
}
|
||||
$environment['TEST_TIMEOUT'] = intval($timeout, 10);
|
||||
break;
|
||||
case '--context':
|
||||
$context_line_count = $argv[++$i] ?? '';
|
||||
@ -545,7 +549,11 @@ function main(): void
|
||||
}
|
||||
break;
|
||||
case '--show-slow':
|
||||
$slow_min_ms = $argv[++$i];
|
||||
$slow_min_ms = $argv[++$i] ?? '';
|
||||
if (!preg_match('/^\d+$/', $slow_min_ms)) {
|
||||
error("'$slow_min_ms' is not a valid number of milliseconds, try e.g. --show-slow 1000 for 1 second");
|
||||
}
|
||||
$slow_min_ms = intval($slow_min_ms, 10);
|
||||
break;
|
||||
case '--temp-source':
|
||||
$temp_source = $argv[++$i];
|
||||
|
Loading…
Reference in New Issue
Block a user