2015-03-17 02:18:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Load all files sorting before the given argument.
|
|
|
|
# You can pass in a prefix, but files matching the prefix *won't* be included.
|
|
|
|
|
2015-02-18 00:57:37 +00:00
|
|
|
set -e
|
|
|
|
set -v
|
2015-10-29 23:43:50 +00:00
|
|
|
make --no-print-directory tangle/tangle
|
|
|
|
make --no-print-directory enumerate/enumerate
|
2015-10-27 19:11:18 +00:00
|
|
|
./tangle/tangle $(./enumerate/enumerate --until $1 |grep -v '.mu$') |grep -v "^\s*//:" > mu.cc
|
|
|
|
cat /dev/null $(./enumerate/enumerate --until $1 |grep '.mu$') > core.mu
|
2015-10-29 23:43:50 +00:00
|
|
|
make --no-print-directory autogenerated_lists
|
2016-04-11 03:26:54 +00:00
|
|
|
set +v
|
2016-05-07 16:45:13 +00:00
|
|
|
if [ `uname` = "Darwin" ]
|
2016-04-11 03:26:54 +00:00
|
|
|
then
|
|
|
|
# Darwin is shit and otherwise thinks mu_bin is newer than the files it just
|
|
|
|
# generated when called from test_all_layers.
|
|
|
|
# All sorts of strange bugs ensue.
|
|
|
|
sleep 1
|
|
|
|
set -v # Darwin's clang and valgrind is shit.
|
2016-04-24 00:02:16 +00:00
|
|
|
CFLAGS=${CFLAGS:-"-g -O3"} make test
|
2016-04-11 03:26:54 +00:00
|
|
|
else
|
|
|
|
set -v
|
2016-05-07 16:45:13 +00:00
|
|
|
CXX=${CXX:-clang++} CFLAGS=${CFLAGS:-"-g -O3 -fsanitize=undefined -Wno-tautological-constant-out-of-range-compare"} make ${2:-valgrind}
|
2016-04-11 03:26:54 +00:00
|
|
|
fi
|