2020-01-29 09:35:10 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-01-29 13:36:23 +00:00
|
|
|
set +x
|
|
|
|
set +e
|
2020-01-29 09:35:10 +00:00
|
|
|
|
2020-01-29 13:36:23 +00:00
|
|
|
srcdir=$( pwd )
|
2020-01-29 09:35:10 +00:00
|
|
|
builddir=$1
|
2020-05-15 13:44:24 +00:00
|
|
|
backend=$2
|
2020-01-29 09:35:10 +00:00
|
|
|
|
2020-07-09 02:19:32 +00:00
|
|
|
# Ignore memory leaks lower in dependencies
|
2021-01-22 18:01:09 +00:00
|
|
|
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0
|
2021-01-22 05:13:13 +00:00
|
|
|
export G_SLICE=always-malloc
|
2020-07-09 02:19:32 +00:00
|
|
|
|
2020-05-15 13:44:24 +00:00
|
|
|
case "${backend}" in
|
|
|
|
x11)
|
2020-08-04 15:59:32 +00:00
|
|
|
xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \
|
2020-05-15 13:44:24 +00:00
|
|
|
meson test -C ${builddir} \
|
2020-07-10 15:08:14 +00:00
|
|
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
2020-01-29 13:36:23 +00:00
|
|
|
--print-errorlogs \
|
2020-05-15 13:44:24 +00:00
|
|
|
--setup=${backend} \
|
2020-01-29 11:31:00 +00:00
|
|
|
--suite=gtk \
|
2020-05-16 14:12:47 +00:00
|
|
|
--no-suite=gsk-compare-broadway
|
2020-01-29 13:36:23 +00:00
|
|
|
|
2020-05-15 13:44:24 +00:00
|
|
|
# Store the exit code for the CI run, but always
|
|
|
|
# generate the reports
|
|
|
|
exit_code=$?
|
|
|
|
;;
|
|
|
|
|
|
|
|
wayland)
|
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
|
|
|
|
2020-05-28 13:15:04 +00:00
|
|
|
weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 &
|
2020-05-15 13:44:24 +00:00
|
|
|
compositor=$!
|
|
|
|
export WAYLAND_DISPLAY=wayland-5
|
|
|
|
|
|
|
|
meson test -C ${builddir} \
|
2020-07-10 15:08:14 +00:00
|
|
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
2020-05-15 13:44:24 +00:00
|
|
|
--print-errorlogs \
|
|
|
|
--setup=${backend} \
|
|
|
|
--suite=gtk \
|
2020-05-16 14:12:47 +00:00
|
|
|
--no-suite=gsk-compare-broadway
|
2020-05-15 13:44:24 +00:00
|
|
|
|
|
|
|
exit_code=$?
|
|
|
|
kill ${compositor}
|
|
|
|
;;
|
|
|
|
|
|
|
|
broadway)
|
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
|
|
|
|
|
|
|
${builddir}/gdk/broadway/gtk4-broadwayd :5 &
|
|
|
|
server=$!
|
|
|
|
export BROADWAY_DISPLAY=:5
|
|
|
|
|
|
|
|
meson test -C ${builddir} \
|
2020-07-10 15:08:14 +00:00
|
|
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
2020-05-15 13:44:24 +00:00
|
|
|
--print-errorlogs \
|
|
|
|
--setup=${backend} \
|
|
|
|
--suite=gtk \
|
2020-05-16 14:12:47 +00:00
|
|
|
--no-suite=gsk-compare-opengl
|
2020-05-15 13:44:24 +00:00
|
|
|
|
2020-05-15 19:23:22 +00:00
|
|
|
# don't let Broadway failures fail the run, for now
|
|
|
|
exit_code=0
|
2020-05-15 13:44:24 +00:00
|
|
|
kill ${server}
|
|
|
|
;;
|
|
|
|
esac
|
2020-01-29 13:36:23 +00:00
|
|
|
|
2020-02-12 18:03:48 +00:00
|
|
|
cd ${builddir}
|
|
|
|
|
2020-01-29 13:36:23 +00:00
|
|
|
$srcdir/.gitlab-ci/meson-junit-report.py \
|
|
|
|
--project-name=gtk \
|
2020-05-15 23:49:18 +00:00
|
|
|
--backend=${backend} \
|
2020-01-29 13:36:23 +00:00
|
|
|
--job-id="${CI_JOB_NAME}" \
|
2020-05-15 13:44:24 +00:00
|
|
|
--output=report-${backend}.xml \
|
|
|
|
meson-logs/testlog-${backend}.json
|
2020-01-29 13:36:23 +00:00
|
|
|
$srcdir/.gitlab-ci/meson-html-report.py \
|
|
|
|
--project-name=gtk \
|
2020-05-15 23:49:18 +00:00
|
|
|
--backend=${backend} \
|
2020-01-29 13:36:23 +00:00
|
|
|
--job-id="${CI_JOB_NAME}" \
|
2020-05-15 13:44:24 +00:00
|
|
|
--reftest-output-dir="testsuite/reftests/output/${backend}" \
|
|
|
|
--output=report-${backend}.html \
|
|
|
|
meson-logs/testlog-${backend}.json
|
2020-01-29 13:36:23 +00:00
|
|
|
|
|
|
|
exit $exit_code
|