diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2020-03-03 12:49:53 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2020-03-03 16:00:04 +0100 |
commit | 3feb60d289ed1987b8957a98e062699f4f004311 (patch) | |
tree | 3064da6e1fc8c908555c282b72136e033c337041 | |
parent | c0d8b96f24daf842f87d726d3a9d144e1c0a5a6c (diff) | |
download | curl-3feb60d289ed1987b8957a98e062699f4f004311.tar.gz |
ci/tests: Move CI test result creation above environment setup
This avoids using our test servers as proxy to the AppVeyor API.
Closes #5022
-rwxr-xr-x | tests/runtests.pl | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 131aef926..51a84f09b 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3358,6 +3358,19 @@ sub singletest { delete $oldenv{$var}; } + # get the name of the test early + my @testname= getpart("client", "name"); + my $testname = $testname[0]; + $testname =~ s/\n//g; + + # create test result in CI services + if(azure_check_environment() && $AZURE_RUN_ID) { + $AZURE_RESULT_ID = azure_create_test_result($AZURE_RUN_ID, $testnum, $testname); + } + elsif(appveyor_check_environment()) { + appveyor_create_test_result($testnum, $testname); + } + # remove test server commands file before servers are started/verified unlink($FTPDCMD) if(-f $FTPDCMD); @@ -3517,9 +3530,6 @@ sub singletest { my $CURLOUT="$LOGDIR/curl$testnum.out"; # curl output if not stdout # name of the test - my @testname= getpart("client", "name"); - my $testname = $testname[0]; - $testname =~ s/\n//g; logmsg "[$testname]\n" if(!$short); if($listonly) { @@ -3743,13 +3753,6 @@ sub singletest { close(GDBCMD); } - if(azure_check_environment() && $AZURE_RUN_ID) { - $AZURE_RESULT_ID = azure_create_test_result($AZURE_RUN_ID, $testnum, $testname); - } - elsif(appveyor_check_environment()) { - appveyor_create_test_result($testnum, $testname); - } - # timestamp starting of test command $timetoolini{$testnum} = Time::HiRes::time(); @@ -5543,6 +5546,7 @@ foreach $testnum (@at) { my $error = singletest($run_event_based, $testnum, $count, scalar(@at)); + # update test result in CI services if(azure_check_environment() && $AZURE_RUN_ID && $AZURE_RESULT_ID) { $AZURE_RESULT_ID = azure_update_test_result($AZURE_RUN_ID, $AZURE_RESULT_ID, $testnum, $error, $timeprepini{$testnum}, $timevrfyend{$testnum}); |