ci: Dump the test log on failure

We need to see what failed, as Meson's test harness will just show the
result.
macos/v1.5.9
Emmanuele Bassi 7 years ago
parent 3824efc25c
commit dadf83df00
  1. 2
      .travis/Dockerfile
  2. 22
      .travis/epoxy-ci-linux.sh
  3. 14
      .travis/epoxy-ci-osx.sh

@ -27,5 +27,3 @@ ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
RUN pip3 install meson
WORKDIR /root
COPY epoxy-run-tests.sh .

@ -1,5 +1,13 @@
#!/bin/bash
dump_log_and_quit() {
local exitcode=$1
cat meson-logs/testlog.txt
exit $exitcode
}
# Start Xvfb
XVFB_WHD=${XVFB_WHD:-1280x720x16}
@ -8,13 +16,17 @@ xvfb=$!
export DISPLAY=:99
mkdir _build
srcdir=$( pwd )
builddir=$( mktemp -d build_XXXXXX )
meson --prefix /usr "$@" $builddir $srcdir || exit $?
cd $builddir
meson --prefix /usr "$@" _build . || exit $?
ninja -C _build || exit $?
meson test -C _build || exit $?
ninja || exit $?
meson test || dump_log_and_quit $?
rm -rf _build
cd ..
# Stop Xvfb
kill -9 ${xvfb}

@ -1,5 +1,13 @@
#!/bin/sh
dump_log_and_quit() {
local exitcode=$1
cat meson-logs/testlog.txt
exit $exitcode
}
export SDKROOT=$( xcodebuild -version -sdk macosx Path )
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
@ -12,8 +20,8 @@ builddir=$( mktemp -d build_XXXXXX )
meson ${BUILDOPTS} $builddir $srcdir || exit $?
cd $builddir
ninja || exit $?
meson test || exit $?
cd ..
meson test || dump_log_and_quit $?
rm -rf $builddir
cd ..

Loading…
Cancel
Save