]> git.sur5r.net Git - i3/i3/blobdiff - travis/run-tests.sh
Update travis for autotools
[i3/i3] / travis / run-tests.sh
index 87c5dbb77809771570fc539240572c7ebd9f945f..44df81d2ffbdf257fdb0c428999290c56c711db5 100755 (executable)
@@ -1,8 +1,32 @@
 #!/bin/sh
-cd testcases
+
+set -e
+set -x
+
+cd build
+
+# TODO: remove this workaround once https://bugs.debian.org/836723 is fixed
+# Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8:
+if [ "$CC" = "clang" ]
+then
+       cat >fixasan.c <<EOT
+void __isoc99_printf() {}
+void __isoc99_sprintf() {}
+void __isoc99_snprintf() {}
+void __isoc99_fprintf() {}
+void __isoc99_vprintf() {}
+void __isoc99_vsprintf() {}
+void __isoc99_vsnprintf() {}
+void __isoc99_vfprintf() {}
+void __cxa_throw() {} // NEW
+EOT
+       gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib
+       export LD_PRELOAD=$PWD/fixasan.so
+fi
+
 # Try running the tests in parallel so that the common case (tests pass) is
 # quick, but fall back to running them in sequence to make debugging easier.
-if ! xvfb-run ./complete-run.pl
+if ! xvfb-run make check
 then
-       xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)
+       xvfb-run ./testcases/complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)
 fi