mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 09:08:49 -05:00
ci/tests: Move CI test result creation above environment setup
This avoids using our test servers as proxy to the AppVeyor API. Closes #5022
This commit is contained in:
parent
c0d8b96f24
commit
3feb60d289
@ -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});
|
||||
|
Loading…
Reference in New Issue
Block a user