]> git.sur5r.net Git - i3/i3/blob - travis/run-tests.sh
Update travis for autotools
[i3/i3] / travis / run-tests.sh
1 #!/bin/sh
2
3 set -e
4 set -x
5
6 cd build
7
8 # TODO: remove this workaround once https://bugs.debian.org/836723 is fixed
9 # Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8:
10 if [ "$CC" = "clang" ]
11 then
12         cat >fixasan.c <<EOT
13 void __isoc99_printf() {}
14 void __isoc99_sprintf() {}
15 void __isoc99_snprintf() {}
16 void __isoc99_fprintf() {}
17 void __isoc99_vprintf() {}
18 void __isoc99_vsprintf() {}
19 void __isoc99_vsnprintf() {}
20 void __isoc99_vfprintf() {}
21 void __cxa_throw() {} // NEW
22 EOT
23         gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib
24         export LD_PRELOAD=$PWD/fixasan.so
25 fi
26
27 # Try running the tests in parallel so that the common case (tests pass) is
28 # quick, but fall back to running them in sequence to make debugging easier.
29 if ! xvfb-run make check
30 then
31         xvfb-run ./testcases/complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)
32 fi