aboutsummaryrefslogtreecommitdiff
path: root/.travis/epoxy-ci-linux.sh
blob: e95584fc4eb73be9670d818a4bbaa96eb0676720 (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
#!/bin/bash

dump_log_and_quit() {
        local exitcode=$1

        cat meson-logs/testlog.txt

        exit $exitcode
}

# Start Xvfb
XVFB_WHD=${XVFB_WHD:-1280x720x16}

Xvfb :99 -ac -screen 0 $XVFB_WHD -nolisten tcp &
xvfb=$!

export DISPLAY=:99

srcdir=$( pwd )
builddir=$( mktemp -d build_XXXXXX )

meson --prefix /usr "$@" $builddir $srcdir || exit $?

cd $builddir

ninja || exit $?
meson test || dump_log_and_quit $?

cd ..

# Stop Xvfb
kill -9 ${xvfb}