]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CI/azure: fix test outcome values and use latest API version
authorMarc Hoersken <info@marc-hoersken.de>
Sun, 9 Aug 2020 13:56:59 +0000 (15:56 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Sun, 9 Aug 2020 19:33:35 +0000 (21:33 +0200)
This makes sure that tests ignored or skipped are not shown
just in the category "Other", but with their correct state.

Closes #5796

tests/azure.pm

index 9dcb56c786078a772a2b855b6d21f05ad03befc0..004c3d309e72797076a6678dc3fe4930e5512b55 100644 (file)
@@ -48,7 +48,7 @@ sub azure_create_test_run {
             'build': {'id': '$ENV{'BUILD_BUILDID'}'}
         }
     " \\
-    "$azure_baseurl/_apis/test/runs?api-version=5.0"`;
+    "$azure_baseurl/_apis/test/runs?api-version=5.1"`;
     if($azure_run =~ /"id":(\d+)/) {
         return $1;
     }
@@ -75,7 +75,7 @@ sub azure_create_test_result {
             }
         ]
     " \\
-    "$azure_baseurl/_apis/test/runs/$azure_run_id/results?api-version=5.0"`;
+    "$azure_baseurl/_apis/test/runs/$azure_run_id/results?api-version=5.1"`;
     if($azure_result =~ /\[\{"id":(\d+)/) {
         return $1;
     }
@@ -92,10 +92,10 @@ sub azure_update_test_result {
     my $azure_duration = sprintf("%.0f", ($stop-$start)*1000);
     my $azure_outcome;
     if($error == 2) {
-        $azure_outcome = 'Not applicable';
+        $azure_outcome = 'NotApplicable';
     }
     elsif($error < 0) {
-        $azure_outcome = 'Not executed';
+        $azure_outcome = 'NotExecuted';
     }
     elsif(!$error) {
         $azure_outcome = 'Passed';
@@ -118,7 +118,7 @@ sub azure_update_test_result {
             }
         ]
     " \\
-    "$azure_baseurl/_apis/test/runs/$azure_run_id/results?api-version=5.0"`;
+    "$azure_baseurl/_apis/test/runs/$azure_run_id/results?api-version=5.1"`;
     if($azure_result =~ /\[\{"id":(\d+)/) {
         return $1;
     }
@@ -136,7 +136,7 @@ sub azure_update_test_run {
             'state': 'Completed'
         }
     " \\
-    "$azure_baseurl/_apis/test/runs/$azure_run_id?api-version=5.0"`;
+    "$azure_baseurl/_apis/test/runs/$azure_run_id?api-version=5.1"`;
     if($azure_run =~ /"id":(\d+)/) {
         return $1;
     }