2016-08-11 20:49:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-06-05 02:34:15 +08:00
|
|
|
export PATH=/opt/ghc/7.8.4/bin:/opt/cabal/1.18/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH
|
|
|
|
export PATH=$HOME/.cabal/bin:$PATH
|
|
|
|
|
2016-08-25 06:52:34 +08:00
|
|
|
CMAKE=cmake
|
2016-11-28 04:24:18 +08:00
|
|
|
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DFORMAT_TEST=ON"
|
2018-01-10 22:44:04 +08:00
|
|
|
# Asan is disabled because it's currently broken on Travis.
|
|
|
|
# See https://github.com/travis-ci/travis-ci/issues/9033.
|
|
|
|
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DASAN=OFF"
|
2016-08-25 06:52:34 +08:00
|
|
|
NPROC=`nproc`
|
|
|
|
CURDIR=$PWD
|
2017-01-06 05:23:06 +08:00
|
|
|
RUN_TESTS=true
|
2016-08-11 20:49:49 +08:00
|
|
|
|
|
|
|
RUN() {
|
|
|
|
"$@"
|
|
|
|
}
|
2016-08-25 06:52:34 +08:00
|
|
|
|
|
|
|
TESTS() {
|
2017-01-19 23:58:03 +08:00
|
|
|
COUNT="$1"; shift
|
|
|
|
"$@" || {
|
|
|
|
if [ $COUNT -gt 1 ]; then
|
|
|
|
TESTS `expr $COUNT - 1` "$@"
|
2017-03-04 13:44:57 +08:00
|
|
|
else
|
|
|
|
false
|
2017-01-19 23:58:03 +08:00
|
|
|
fi
|
|
|
|
}
|
2016-08-25 06:52:34 +08:00
|
|
|
}
|