[php-src] master: Skip online tests by default
| From: | Ilija Tovilo | Date: | Tue, 30 Apr 2024 12:11:42 +0000 |
| Subject: | [php-src] master: Skip online tests by default | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-128256@lists.php.net to get a copy of this message | ||
Author: Ilija Tovilo (iluuu1994)
Date: 2024-04-30T14:10:46+02:00
Commit: https://github.com/php/php-src/commit/cb55588a7ec11f528ccc7548beafabdbc7975889
Raw diff: https://github.com/php/php-src/commit/cb55588a7ec11f528ccc7548beafabdbc7975889.diff
Skip online tests by default
Fixes GH-14058
Closes GH-14070
Changed paths:
M UPGRADING
M run-tests.php
Diff:
diff --git a/UPGRADING b/UPGRADING
index 0cb4bf305b4e..9456f99fede0 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -652,6 +652,10 @@ PHP 8.4 UPGRADE NOTES
and the line of definition to make them easier to distinguish, for example
within stack traces.
+* run-tests.php now skips online tests by default. Set the SKIP_ONLINE_TESTS
+ environment variable to 0, or pass the --online flag to run-tests.php to
+ execute them.
+
========================================
14. Performance Improvements
========================================
diff --git a/run-tests.php b/run-tests.php
index 5837a1a85000..5314a26f4855 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -75,9 +75,11 @@ function show_usage(): void
-s <file> Write output to <file>.
- -x Sets 'SKIP_SLOW_TESTS' environmental variable.
+ -x Sets 'SKIP_SLOW_TESTS' environment variable.
- --offline Sets 'SKIP_ONLINE_TESTS' environmental variable.
+ --online Prevents setting the 'SKIP_ONLINE_TESTS' environment variable.
+
+ --offline Sets 'SKIP_ONLINE_TESTS' environment variable (default).
--verbose
-v Verbose mode.
@@ -355,6 +357,7 @@ function main(): void
$num_repeats = 1;
$show_progress = true;
$ignored_by_ext = [];
+ $online = null;
$cfgtypes = ['show', 'keep'];
$cfgfiles = ['skip', 'php', 'clean', 'out',
'diff', 'exp', 'mem'];
@@ -553,8 +556,11 @@ function main(): void
case 'x':
$environment['SKIP_SLOW_TESTS'] = 1;
break;
+ case '--online':
+ $online = true;
+ break;
case '--offline':
- $environment['SKIP_ONLINE_TESTS'] = 1;
+ $online = false;
break;
case '--shuffle':
$shuffle = true;
@@ -637,6 +643,13 @@ function main(): void
}
}
+ if ($online === null && !isset($environment['SKIP_ONLINE_TESTS'])) {
+ $online = false;
+ }
+ if ($online !== null) {
+ $environment['SKIP_ONLINE_TESTS'] = $online ? '0' : '1';
+ }
+
if ($selected_tests && count($test_files) === 0) {
echo "No tests found.\n";
return;