2016-02-01 09:42:55 +01:00
|
|
|
#!/bin/sh
|
2016-03-27 21:11:30 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2016-02-01 09:42:55 +01:00
|
|
|
cd testcases
|
2016-09-05 08:42:34 +02:00
|
|
|
|
|
|
|
# TODO: remove this workaround once https://bugs.debian.org/836723 is fixed
|
|
|
|
# Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8:
|
2016-09-05 08:55:26 +02:00
|
|
|
if [ "$CC" = "clang" ]
|
|
|
|
then
|
|
|
|
cat >fixasan.c <<EOT
|
2016-09-05 08:42:34 +02:00
|
|
|
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
|
2016-09-05 08:55:26 +02:00
|
|
|
gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib
|
|
|
|
export LD_PRELOAD=$PWD/fixasan.so
|
|
|
|
fi
|
2016-09-05 08:42:34 +02:00
|
|
|
|
2016-02-01 09:42:55 +01:00
|
|
|
# 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
|
|
|
|
then
|
|
|
|
xvfb-run ./complete-run.pl --parallel=1 || (cat latest/complete-run.log; false)
|
|
|
|
fi
|