aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/deqp-runner.sh
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-11-17 12:04:50 -0800
committerRob Clark <[email protected]>2019-11-22 13:48:29 -0800
commit9f422cbe1cb7049f86ec20f889452e8544ab3fee (patch)
tree4466f69dcc10fb83ffdb12385e0f0caaa9c3fa4e /.gitlab-ci/deqp-runner.sh
parent415d565d96278d81255bf85eefdb2553e15e15c6 (diff)
gitlab-ci/deqp: generate junit results
Signed-off-by: Rob Clark <[email protected]> Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to '.gitlab-ci/deqp-runner.sh')
-rwxr-xr-x.gitlab-ci/deqp-runner.sh27
1 files changed, 27 insertions, 0 deletions
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/