Mesa (master): gitlab-ci/deqp: generate junit results

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 22 22:06:40 UTC 2019


Module: Mesa
Branch: master
Commit: 9f422cbe1cb7049f86ec20f889452e8544ab3fee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f422cbe1cb7049f86ec20f889452e8544ab3fee

Author: Rob Clark <robdclark at chromium.org>
Date:   Sun Nov 17 12:04:50 2019 -0800

gitlab-ci/deqp: generate junit results

Signed-off-by: Rob Clark <robdclark at chromium.org>
Acked-by: Eric Engestrom <eric.engestrom at intel.com>

---

 .gitlab-ci.yml            |  3 +++
 .gitlab-ci/deqp-runner.sh | 27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 995bf5b278a..52da56863ca 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -514,6 +514,9 @@ piglit-glslparser+quick_shader:
     DEQP_SKIPS: deqp-default-skips.txt
   script:
     - ./artifacts/deqp-runner.sh
+  artifacts:
+    reports:
+      junit: results/results.xml
 
 test-llvmpipe-gles2:
   variables:
diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index 044ff5981ad..b8b63b88161 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -136,6 +136,31 @@ extract_xml_results() {
     done
 }
 
+# Generate junit results
+generate_junit() {
+    results=$1
+    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+    echo "<testsuites>"
+    echo "<testsuite name=\"$DEQP_VER-$CI_NODE_INDEX\">"
+    while read line; do
+        testcase=${line%,*}
+        result=${line#*,}
+        # avoid counting Skip's in the # of tests:
+        if [ "$result" = "Skip" ]; then
+            continue;
+        fi
+        echo "<testcase name=\"$testcase\">"
+        if [ "$result" != "Pass" ]; then
+            echo "<failure type=\"$result\">"
+            echo "$result: See $CI_JOB_URL/artifacts/results/$testcase.xml"
+            echo "</failure>"
+        fi
+        echo "</testcase>"
+    done < $results
+    echo "</testsuite>"
+    echo "</testsuites>"
+}
+
 # wrapper to supress +x to avoid spamming the log
 quiet() {
     set +x
@@ -146,6 +171,8 @@ quiet() {
 run_cts /tmp/case-list.txt $RESULTS/cts-runner-results.txt
 DEQP_EXITCODE=$?
 
+quiet generate_junit $RESULTS/cts-runner-results.txt > $RESULTS/results.xml
+
 if [ $DEQP_EXITCODE -ne 0 ]; then
     # preserve caselist files in case of failures:
     cp /tmp/cts_runner.*.txt $RESULTS/




More information about the mesa-commit mailing list