From 09be7f65d57704ef7f466730f93e4651b0e205fd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 30 Jul 2023 13:29:36 +0300 Subject: [PATCH] Add a single test runner Running the whole test suite is not fun, and the magic incantations for running a specific backend are too complicated to remember. --- .gitlab-ci/run-single-test.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 .gitlab-ci/run-single-test.sh diff --git a/.gitlab-ci/run-single-test.sh b/.gitlab-ci/run-single-test.sh new file mode 100755 index 0000000000..a3962531b8 --- /dev/null +++ b/.gitlab-ci/run-single-test.sh @@ -0,0 +1,32 @@ +#!/usr/bin/sh +# +builddir=$1 +suite=$2 +unit=$3 + +echo "** builddir: ${builddir}" +echo "** suite: ${suite}" +echo "** unit: ${unit}" + +export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)" + +weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 & +compositor=$! + +export WAYLAND_DISPLAY=wayland-5 + +meson test -C ${builddir} \ + --print-errorlogs \ + --setup=wayland \ + --suite=${suite} \ + --no-suite=failing \ + --no-suite=flaky \ + --no-suite=wayland_failing \ + --no-suite=gsk-compare-broadway \ + --verbose \ + "${unit}" + +exit_code=$? +kill ${compositor} + +exit ${exit_code}