summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-04-28 12:52:07 -0700
committerDan Fandrich <dan@coneharvesters.com>2023-05-05 00:45:43 -0700
commit0754de758a67611e9727892262bdcec5d1943024 (patch)
tree4d13f9ce26e51f41991fad6967ecff8615a7e575
parentd4d22adf4013c8c576db301a0f2bc84d823b9fa6 (diff)
downloadcurl-0754de758a67611e9727892262bdcec5d1943024.tar.gz
runtests: call citest_finishtest in singletest
This is where citest_starttest is called. Ref: #10818
-rwxr-xr-xtests/runtests.pl29
1 files changed, 21 insertions, 8 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 6ffa032be..20497a2bd 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1656,6 +1656,8 @@ sub singletest {
# Print the test name and count tests
$error = singletest_count($testnum, $why);
if($error) {
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $error);
return $error;
}
@@ -1671,17 +1673,24 @@ sub singletest {
if($error == -1) {
# no further verification will occur
$timevrfyend{$testnum} = Time::HiRes::time();
+ my $err = ignoreresultcode($testnum);
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $err);
# return a test failure, either to be reported or to be ignored
- return ignoreresultcode($testnum);
+ return $err;
}
elsif($error == -2) {
# fill in the missing timings on error
timestampskippedevents($testnum);
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $error);
return $error;
}
elsif($error > 0) {
# no further verification will occur
$timevrfyend{$testnum} = Time::HiRes::time();
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $error);
return $error;
}
@@ -1689,13 +1698,18 @@ sub singletest {
# Verify that the test succeeded
$error = singletest_check($testnum, $cmdres, $CURLOUT, $tool, $usedvalgrind);
if($error == -1) {
+ my $err = ignoreresultcode($testnum);
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $err);
# return a test failure, either to be reported or to be ignored
- return ignoreresultcode($testnum);
+ return $err;
}
elsif($error == -2) {
- # torture test; there is no verification, so the run result holds the
- # test success code
- return $cmdres;
+ # torture test; there is no verification, so the run result holds the
+ # test success code
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, $cmdres);
+ return $cmdres;
}
@@ -1703,6 +1717,8 @@ sub singletest {
# Report a successful test
singletest_success($testnum, $count, $total, ignoreresultcode($testnum));
+ # Submit the test case result with the CI environment
+ citest_finishtest($testnum, 0);
return 0;
}
@@ -2509,9 +2525,6 @@ foreach my $testnum (@runtests) {
# execute one test case
my $error = singletest($testnum, $count, scalar(@runtests));
- # Submit the test case result with the CI environment
- citest_finishtest($testnum, $error);
-
if($error < 0) {
# not a test we can run
next;