summaryrefslogtreecommitdiff
path: root/.gitlab-ci/test-docker.sh
blob: 1df2da094ae9a126049fcd57ab1d1e8bfea16751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/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=enabled \
        -Dprofiler=true \
        --werror \
        ${EXTRA_MESON_FLAGS:-} \
        _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:a11y

# Save the exit code
exit_code=$?

# We always want to run the report generators
$srcdir/.gitlab-ci/meson-junit-report.py \
        --project-name=gtk \
        --job-id="${CI_JOB_NAME}" \
        --output=report.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 \
        meson-logs/testlog.json

exit $exit_code