CI: Make pytest export JUnitXML

Both GitLab and Azure (and other CI systems) have native support for
displaying JUnitXML test report results. The pytest framework that we
use can generate these reports. Change our CI tests so that they will
generate these reports and then have the respective CI platform pick
them up. We write to different locations because of where each CI is
(and isn't) able to easily pass things along.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 165f765..a6c5040 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,7 +41,7 @@
       fi
 
   after_script:
-    - cp -v /tmp/${TEST_PY_BD}/*.{html,css} .
+    - cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} .
     - rm -rf /tmp/uboot-test-hooks /tmp/venv
   script:
     # If we've been asked to use clang only do one configuration.
@@ -83,11 +83,14 @@
       ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
         ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
         --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
+        --junitxml=/tmp/${TEST_PY_BD}/results.xml
   artifacts:
     when: always
     paths:
       - "*.html"
       - "*.css"
+    reports:
+      junit: results.xml
     expire_in: 1 week
 
 .world_build: