gtk2/.gitlab-ci/test-docker.sh
Emmanuele Bassi 220c516691 ci: Call the report script on failure as well
GitLab's CI will bail out at the first failure, which means the
JSON-to-JUnit conversion script won't run unless it's part of the same
script that we run for building an testing.
2019-04-05 20:29:16 +01:00

49 lines
915 B
Bash
Executable File

#!/bin/bash
set -e
srcdir=$(pwd)
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
ccache --zero-stats
ccache --show-stats
export CCACHE_DISABLE=true
meson \
-Dx11-backend=true \
-Dwayland-backend=true \
-Dbroadway-backend=true \
-Dvulkan=yes \
_build $srcdir
unset CCACHE_DISABLE
cd _build
ninja
ccache --show-stats
set +e
xvfb-run -a -s "-screen 0 1024x768x24" \
meson test \
--timeout-multiplier 2 \
--print-errorlogs \
--suite=gtk \
--no-suite=gtk:gsk \
--no-suite=gtk:reftest \
--no-suite=gtk:a11y
# Save the exit code
exit_code=$?
# We always want to run the report generator
$srcdir/.gitlab-ci/meson-junit-report.py \
--project-name=gtk \
--job-id="${CI_JOB_NAME}" \
--output=report.xml \
meson-logs/testlog.json
exit $exit_code