[gtk/ci-jobs: 18/19] ci: Generate the report for the release builds



commit 75d494d9cf453ccfb7acc8afe8ee55dcb0d51fd1
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jan 29 14:36:23 2020 +0100

    ci: Generate the report for the release builds
    
    We are going to need to hide the report generation into the test runner
    script, as we want the job to produce the reports even in case of
    failure, instead of bailing out immediately.

 .gitlab-ci.yml          | 20 ++++----------------
 .gitlab-ci/run-tests.sh | 27 ++++++++++++++++++++++++---
 2 files changed, 28 insertions(+), 19 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 276b3e903d..26e4c0ea10 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,17 +34,6 @@ fedora-x86_64:
             _build
     - ninja -C _build
     - .gitlab-ci/run-tests.sh _build
-    - .gitlab-ci/meson-junit-report.py
-            --project-name=gtk
-            --job-id="${CI_JOB_NAME}"
-            --output=_build/report.xml
-            _build/meson-logs/testlog.json
-    - .gitlab-ci/meson-html-report.py
-            --project-name=gtk
-            --job-id="${CI_JOB_NAME}"
-            --reftest-output-dir="_build/testsuite/reftests/output"
-            --output=_build/report.html
-            _build/meson-logs/testlog.json
   artifacts:
     when: always
     reports:
@@ -76,11 +65,6 @@ release-build:
             _build
     - ninja -C _build
     - .gitlab-ci/run-tests.sh _build
-    - .gitlab-ci/meson-junit-report.py
-            --project-name=gtk
-            --job-id="${CI_JOB_NAME}"
-            --output=_build/report.xml
-            _build/meson-logs/testlog.json
   artifacts:
     when: always
     reports:
@@ -90,6 +74,10 @@ release-build:
     paths:
       - "${CI_PROJECT_DIR}/_build/meson-logs"
       - "${CI_PROJECT_DIR}/_build/report.xml"
+      - "${CI_PROJECT_DIR}/_build/report.html"
+      - "${CI_PROJECT_DIR}/_build/testsuite/reftests/output/*.png"
+      - "${CI_PROJECT_DIR}/_build/testsuite/gsk/compare/*/*.png"
+      - "${CI_PROJECT_DIR}/_build/testsuite/css/output/*.syscap"
   cache:
     key: "$CI_JOB_NAME"
     <<: *cache-paths
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
index 136988e11e..9bac5b93c8 100755
--- a/.gitlab-ci/run-tests.sh
+++ b/.gitlab-ci/run-tests.sh
@@ -1,11 +1,32 @@
 #!/bin/bash
 
-set -e
+set +x
+set +e
 
+srcdir=$( pwd )
 builddir=$1
 
-cd ${builddir}
+export GDK_BACKEND=x11
 xvfb-run -a -s "-screen 0 1024x768x24" \
-        meson test --print-errorlogs \
+        meson test -C ${builddir} \
+                --print-errorlogs \
                 --suite=gtk \
                 --no-suite=gtk:a11y
+
+# Store the exit code for the CI run, but always
+# generate the reports
+exit_code=$?
+
+$srcdir/.gitlab-ci/meson-junit-report.py \
+        --project-name=gtk \
+        --job-id="${CI_JOB_NAME}" \
+        --output=${builddir}/report.xml \
+        ${builddir}/meson-logs/testlog.json
+$srcdir/.gitlab-ci/meson-html-report.py \
+        --project-name=gtk \
+        --job-id="${CI_JOB_NAME}" \
+        --reftest-output-dir="${builddir}/testsuite/reftests/output" \
+        --output=${builddir}/report.html \
+        ${builddir}/meson-logs/testlog.json
+
+exit $exit_code


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