ci: Consistent pass/fail result output
authorDaniel Stone <daniels@collabora.com>
Fri, 11 Jun 2021 15:44:55 +0000 (16:44 +0100)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 15 Jun 2021 12:02:44 +0000 (14:02 +0200)
One less point of differentiation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Martin Peres <martin.peres@mupuf.org>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11337>

.gitlab-ci/bare-metal/cros_servo_run.py
.gitlab-ci/bare-metal/fastboot_run.py
.gitlab-ci/bare-metal/poe_run.py
.gitlab-ci/common/init-stage2.sh
.gitlab-ci/lava/lava.yml.jinja2

index dc5014b..8b3b807 100755 (executable)
@@ -139,7 +139,7 @@ class CrosServoRun:
                 self.print_error("Detected cheza power management bus error, restarting run...")
                 return 2
 
-            result = re.search("bare-metal result: (\S*)", line)
+            result = re.search("hwci: mesa: (\S*)", line)
             if result:
                 if result.group(1) == "pass":
                     return 0
index 3e96629..8b9ce1d 100755 (executable)
@@ -83,7 +83,7 @@ class FastbootRun:
                     "Detected kernel soft lockup, restarting run...")
                 return 2
 
-            result = re.search("bare-metal result: (\S*)", line)
+            result = re.search("hwci: mesa: (\S*)", line)
             if result:
                 if result.group(1) == "pass":
                     return 0
index 6a1a92d..f22b90d 100755 (executable)
@@ -66,7 +66,7 @@ class PoERun:
                 self.print_error("Memory overflow in the binner; GPU hang")
                 return 1
 
-            result = re.search("bare-metal result: (\S*)", line)
+            result = re.search("hwci: mesa: (\S*)", line)
             if result:
                 if result.group(1) == "pass":
                     return 0
index 3f5207d..346574d 100755 (executable)
@@ -45,10 +45,9 @@ if [ -n "$BM_START_XORG" ]; then
   export DISPLAY=:0
 fi
 
+RESULT=fail
 if sh $BARE_METAL_TEST_SCRIPT; then
-  OK=1
-else
-  OK=0
+  RESULT=pass
 fi
 
 # upload artifacts via webdav
@@ -57,8 +56,4 @@ if [ -n "$WEBDAV" ]; then
   find /results -type f -exec curl -T {} $WEBDAV/{} \;
 fi
 
-if [ $OK -eq 1 ]; then
-    echo "bare-metal result: pass"
-else
-    echo "bare-metal result: fail"
-fi
+echo "hwci: mesa: $RESULT"
index b83b200..585263a 100644 (file)
@@ -128,10 +128,9 @@ actions:
                export DISPLAY=:0;
              fi"
 
-          - "if sh $LAVA_TEST_SCRIPT; then
+          - "export RESULT=fail;
+            if sh $LAVA_TEST_SCRIPT; then
                   export RESULT=pass;
-             else
-                  export RESULT=fail;
              fi"
 
           - "if [ -d results ]; then
@@ -140,9 +139,9 @@ actions:
                 ci-fairy minio cp results.tar.gz minio://${JOB_ARTIFACTS_BASE}/results.tar.gz;
              fi"
 
-          - "echo mesa: $RESULT"
+          - "echo hwci: mesa: $RESULT"
         parse:
-          pattern: '(?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
+          pattern: 'hwci: (?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
       from: inline
       name: mesa
       path: inline/mesa.yaml