summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-04-18 14:15:09 -0700
committerDan Fandrich <dan@coneharvesters.com>2023-04-22 12:58:03 -0700
commitc6e7f6c61f6443e78a7bcd6700893819e4a03dba (patch)
tree26101d8cff02ee10f1111d5c2c42c5b39a24ae7a
parent6210bc0111ba0ee097e336d5fbcd7abc8a5ea450 (diff)
downloadcurl-c6e7f6c61f6443e78a7bcd6700893819e4a03dba.tar.gz
runtests: skip test preprocessing when doing -l
This speeds up the output tremendously by avoiding unnecessary work.
-rwxr-xr-xtests/runtests.pl36
1 files changed, 20 insertions, 16 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 510695747..102d8a27d 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1561,24 +1561,26 @@ sub singletest {
# Verify that the test should be run
my ($why, $errorreturncode) = singletest_shouldrun($testnum);
+ if(!$listonly) {
- #######################################################################
- # Restore environment variables that were modified in a previous run.
- # Test definition may instruct to (un)set environment vars.
- # This is done this early so that leftover variables don't affect starting
- # servers or CI registration.
- restore_test_env(1);
+ ###################################################################
+ # Restore environment variables that were modified in a previous run.
+ # Test definition may instruct to (un)set environment vars.
+ # This is done this early so that leftover variables don't affect
+ # starting servers or CI registration.
+ restore_test_env(1);
- #######################################################################
- # Register the test case with the CI environment
- citest_starttest($testnum);
+ ###################################################################
+ # Register the test case with the CI environment
+ citest_starttest($testnum);
- if(!$why) {
- $why = runner_test_preprocess($testnum);
- } else {
+ if(!$why) {
+ $why = runner_test_preprocess($testnum);
+ } else {
- # set zero servers verification time when they aren't started
- $timesrvrini{$testnum} = $timesrvrend{$testnum} = Time::HiRes::time();
+ # set zero servers verification time when they aren't started
+ $timesrvrini{$testnum} = $timesrvrend{$testnum} = Time::HiRes::time();
+ }
}
#######################################################################
@@ -2389,8 +2391,10 @@ foreach my $testnum (@at) {
# execute one test case
my $error = singletest($testnum, $count, scalar(@at));
- # Submit the test case result with the CI environment
- citest_finishtest($testnum, $error);
+ if(!$listonly) {
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $error);
+ }
if($error < 0) {
# not a test we can run