[gtk/wip/ebassi/ci-junit-report] ci: Call the report script on failure as well



commit 06254e4db36cf21c1e49364b92e61de01627a4c8
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Apr 5 19:29:58 2019 +0100

    ci: Call the report script on failure as well
    
    GitLab's CI will bail out at the first failure, which means the
    JSON-to-JUnit conversion script won't run unless it's part of the same
    script that we run for building an testing.

 .gitlab-ci.yml            |  1 -
 .gitlab-ci/test-docker.sh | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81694a71c8..20d7bb309d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,7 +17,6 @@ fedora-x86_64:
   stage: build
   script:
     - bash -x ./.gitlab-ci/test-docker.sh
-    - python3 ./.gitlab-ci/meson-junit-report.py --project-name=gtk --job-id="${CI_JOB_NAME}" 
--output=_build/report.xml _build/meson-logs/testlog.json
   artifacts:
     reports:
       junit:
diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker.sh
index 8a952d7356..69ec9da5ba 100755
--- a/.gitlab-ci/test-docker.sh
+++ b/.gitlab-ci/test-docker.sh
@@ -31,3 +31,13 @@ xvfb-run -a -s "-screen 0 1024x768x24" \
         --suite=gtk \
         --no-suite=gtk:gsk \
         --no-suite=gtk:a11y
+
+exit_code=$?
+
+$srcdir/.gitlab-ci/meson-junit-report.py \
+        --project-name=gtk \
+        --job-id="${CI_JOB_NAME}" \
+        --output=report.xml \
+        meson-logs/testlog.json
+
+exit $exit_code


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]