[gtk/headless-seatless] ci: Run tests with different backends
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/headless-seatless] ci: Run tests with different backends
- Date: Fri, 15 May 2020 13:51:48 +0000 (UTC)
commit 24d4e6b9f282f3eebc9bbd2030ae71cbf6d3e402
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 15 09:44:24 2020 -0400
ci: Run tests with different backends
Run the testsuite under x11, wayland and broadway
in the fedora-x86_64 job. This requires us to use
the v17 image which includes weston.
.gitlab-ci.yml | 24 +++++++++++++-----------
.gitlab-ci/run-tests.sh | 49 ++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 53 insertions(+), 20 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b228e9c657..3b84f6afb7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,7 +34,7 @@ style-check-diff:
- .gitlab-ci/run-style-check-diff.sh
fedora-x86_64:
- image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
+ image: registry.gitlab.gnome.org/gnome/gtk/fedora:v17
stage: build
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
@@ -47,7 +47,9 @@ fedora-x86_64:
-Dprofiler=true
_build
- ninja -C _build
- - .gitlab-ci/run-tests.sh _build
+ - .gitlab-ci/run-tests.sh _build x11
+ - .gitlab-ci/run-tests.sh _build wayland
+ - .gitlab-ci/run-tests.sh _build broadway
artifacts:
when: always
reports:
@@ -58,9 +60,9 @@ fedora-x86_64:
- "${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"
+ - "${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
@@ -78,7 +80,7 @@ release-build:
-Dvulkan=yes
_build
- ninja -C _build
- - .gitlab-ci/run-tests.sh _build
+ - .gitlab-ci/run-tests.sh _build x11
artifacts:
when: always
reports:
@@ -87,11 +89,11 @@ release-build:
name: "gtk-${CI_COMMIT_REF_NAME}"
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"
+ - "${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 5638fa6593..84e67305b2 100755
--- a/.gitlab-ci/run-tests.sh
+++ b/.gitlab-ci/run-tests.sh
@@ -5,30 +5,61 @@ set +e
srcdir=$( pwd )
builddir=$1
+backend=$2
-export GDK_BACKEND=x11
-xvfb-run -a -s "-screen 0 1024x768x24" \
- meson test -C ${builddir} \
+case "${backend}"
+ x11)
+ xvfb-run -a -s "-screen 0 1024x768x24" \
+ meson test -C ${builddir} \
--print-errorlogs \
+ --setup=${backend} \
--suite=gtk \
--no-suite=gtk:a11y
-# Store the exit code for the CI run, but always
-# generate the reports
-exit_code=$?
+ # Store the exit code for the CI run, but always
+ # generate the reports
+ exit_code=$?
+ ;;
+
+ wayland)
+ weston --backend=headless-backend.so --socket=wayland-5 &
+ compositor=$!
+ export WAYLAND_DISPLAY=wayland-5
+ meson test -C ${builddir} \
+ --print-errorlogs \
+ --setup=${backend} \
+ --suite=gtk \
+ --no-suite=gtk:a11y
+ exit_code=$?
+ kill ${compositor}
+ ;;
+
+ broadway)
+ ${builddir}/gdk/broadway/gtk4-broadwayd :5 &
+ server=$!
+ export BROADWAY_DISPLAY=:5
+ meson test -C ${builddir} \
+ --print-errorlogs \
+ --setup=${backend} \
+ --suite=gtk \
+ --no-suite=gtk:a11y
+ exit_code=$?
+ kill ${server}
+ ;;
+esac
cd ${builddir}
$srcdir/.gitlab-ci/meson-junit-report.py \
--project-name=gtk \
--job-id="${CI_JOB_NAME}" \
- --output=report.xml \
+ --output=report-${backend}.xml \
meson-logs/testlog.json
$srcdir/.gitlab-ci/meson-html-report.py \
--project-name=gtk \
--job-id="${CI_JOB_NAME}" \
- --reftest-output-dir="testsuite/reftests/output" \
- --output=report.html \
+ --reftest-output-dir="testsuite/reftests/output/${backend}" \
+ --output=report-{backend}.html \
meson-logs/testlog.json
exit $exit_code
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]