mirror of
https://github.com/moparisthebest/curl
synced 2024-11-17 15:05:02 -05:00
runtests: fix output to command log
- Record only the command of the most recently ran test in the command
log.
This is a follow-up to 02988b7
from several weeks ago which fixed
writing to the command log, however it saved all commands for all tests
instead of just the most recently ran test as we would now expect.
Fixes https://github.com/curl/curl/commit/02988b7#commitcomment-37546876
Closes https://github.com/curl/curl/pull/5001
This commit is contained in:
parent
a2ad278756
commit
711f022c05
@ -2566,7 +2566,7 @@ sub cleardir {
|
|||||||
opendir(DIR, $dir) ||
|
opendir(DIR, $dir) ||
|
||||||
return 0; # can't open dir
|
return 0; # can't open dir
|
||||||
while($file = readdir(DIR)) {
|
while($file = readdir(DIR)) {
|
||||||
if(($file !~ /^\./) && ($file ne $CURLLOG)) {
|
if(($file !~ /^\./)) {
|
||||||
unlink("$dir/$file");
|
unlink("$dir/$file");
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
@ -3721,7 +3721,9 @@ sub singletest {
|
|||||||
logmsg "$CMDLINE\n";
|
logmsg "$CMDLINE\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open(CMDLOG, ">", "$LOGDIR/$CURLLOG");
|
||||||
print CMDLOG "$CMDLINE\n";
|
print CMDLOG "$CMDLINE\n";
|
||||||
|
close(CMDLOG);
|
||||||
|
|
||||||
unlink("core");
|
unlink("core");
|
||||||
|
|
||||||
@ -5410,14 +5412,6 @@ if($scrambleorder) {
|
|||||||
$TESTCASES = join(" ", @rand);
|
$TESTCASES = join(" ", @rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Start the command line log
|
|
||||||
#
|
|
||||||
open(CMDLOG, ">", "$LOGDIR/$CURLLOG") ||
|
|
||||||
logmsg "can't log command lines to $CURLLOG\n";
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
# Display the contents of the given file. Line endings are canonicalized
|
# Display the contents of the given file. Line endings are canonicalized
|
||||||
# and excessively long files are elided
|
# and excessively long files are elided
|
||||||
sub displaylogcontent {
|
sub displaylogcontent {
|
||||||
@ -5583,11 +5577,6 @@ if(azure_check_environment() && $AZURE_RUN_ID) {
|
|||||||
$AZURE_RUN_ID = azure_update_test_run($AZURE_RUN_ID);
|
$AZURE_RUN_ID = azure_update_test_run($AZURE_RUN_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Close command log
|
|
||||||
#
|
|
||||||
close(CMDLOG);
|
|
||||||
|
|
||||||
# Tests done, stop the servers
|
# Tests done, stop the servers
|
||||||
stopservers($verbose);
|
stopservers($verbose);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user