diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-06-17 14:20:51 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-06-17 14:20:51 +0200 |
commit | 474db4f103e56fb772748b87031c824eed723d1f (patch) | |
tree | 05019ef3a3dd49bd62cf2cceb10d64ee3cec5a7e | |
parent | 672ff597e500e38cda87aee60de655acbbc22ed7 (diff) | |
download | curl-bagder/runtests-keepoutfiles.tar.gz |
runtests: keep logfiles around by defaultbagder/runtests-keepoutfiles
Make '-k' a no-op. The singletest function now clears the log directory
BEFORE each individual test and not after, which makes it possible to
always keep the logfiles around after a test has been run. No need to
specify -k anymore. Keeping the option parsing around to work with users
of old habits.
Some tests also didn't work properly when -k was used (since the old
logs would be kep when a new test starts) which this change also fixes.
-rwxr-xr-x | tests/runtests.pl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 59788404e..88896cbe7 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3125,6 +3125,9 @@ sub singletest { my $cmd; my $disablevalgrind; + # fist, remove all lingering log files + cleardir($LOGDIR); + # copy test number to a global scope var, this allows # testnum checking when starting test harness servers. $testnumcheck = $testnum; @@ -4083,9 +4086,6 @@ sub singletest { # Skip all the verification on torture tests if ($torture) { - if(!$cmdres && !$keepoutfiles) { - cleardir($LOGDIR); - } # timestamp test result verification end $timevrfyend{$testnum} = Time::HiRes::time(); return $cmdres; @@ -4516,10 +4516,6 @@ sub singletest { logmsg "PASS: $testnum - $testname\n"; } - # the test succeeded, remove all log files - if(!$keepoutfiles) { - cleardir($LOGDIR); - } return 0; } |