[mutter] gitlab-ci: Add test stage
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] gitlab-ci: Add test stage
- Date: Wed, 14 Nov 2018 15:02:15 +0000 (UTC)
commit 18c1d9672ab964aafdf506e27e4e211550a874c1
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Aug 17 14:15:29 2018 +0200
gitlab-ci: Add test stage
The test stage runs the whole meson test suite inside Xvfb inside a dbus
session. Running inside Xvfb is required as the cogl, clutter and mutter
tests require to run on top of X11; the dbus session is required to make
mutter succeed in owning names on the bus.
This also updates the Dockerfile to include packages needed for running
tests.
https://gitlab.gnome.org/GNOME/mutter/issues/193
.gitlab-ci.yml | 13 +++++++++++++
.gitlab-ci/Dockerfile | 3 +++
2 files changed, 16 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index df15a050d..32a1797a1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stages:
- build
+ - test
build-mutter:
stage: build
@@ -9,3 +10,15 @@ build-mutter:
- meson . build -Degl_device=true -Dwayland_eglstream=true
- ninja -C build
- ninja -C build install
+
+test-mutter:
+ stage: test
+ script:
+ - meson . build -Degl_device=true -Dwayland_eglstream=true
+ - ninja -C build
+ - glib-compile-schemas $PWD/build/data
+ - env XDG_RUNTIME_DIR=/tmp/ GSETTINGS_SCHEMA_DIR=$PWD/build/data dbus-run-session -- xvfb-run -s '+iglx
-noreset' meson test -C build --verbose --no-stdsplit
+ artifacts:
+ paths:
+ - build/meson-logs
+ when: on_failure
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index cc7136d43..a1dd27c38 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -7,5 +7,8 @@ RUN dnf -y update && dnf -y upgrade && \
# Until Fedora catches up with meson build-deps
dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel
xorg-x11-server-Xwayland && \
+ # For running unit tests
+ dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
+
dnf install -y intltool redhat-rpm-config make && \
dnf clean all
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]