2 # Repeatedly stop building until successive layers, and run all tests built,
3 # while checking for undefined behavior using both UBSan and Valgrind.
10 # Test non-app layers after x:
12 # Test layers after x and until y (inclusive):
14 # Test all layers for a specific app:
18 test "$BUILD" ||
export BUILD
=build3
20 if [[ $1 == one-off
]]
23 .
/mu_bin
test ||
exit 1
27 # Core layers atop Valgrind
30 if [[ $f < $1 ]]; then continue; fi
31 if [[ $2 && $f > $2 ]]; then exit 0; fi
33 .
/clean top-level
# preserve subsidiary tools like tangle and cleave
34 .
/$BUILD --until $f ||
exit 1
35 # valgrind requires Linux
36 valgrind
--leak-check=yes --num-callers=40 -q --error-exitcode=1 .
/mu_bin
test ||
exit 1
37 # run on Mac OS without valgrind, and with a hacky fix for the coarser clock
38 #? ./mu_bin test || exit 1
42 # Layers for Mu apps without Valgrind
46 if [[ ! $1 ||
$1 == chessboard
]]
49 .
/mu_bin
test chessboard.mu ||
exit 1
52 # slices of edit/ for Travis CI
53 if [[ ! $1 ||
$1 == edit
]]
55 echo "=== edit: until 001"
56 .
/mu_bin
test edit
/001* ||
exit 1
57 echo "=== edit: until 002"
58 .
/mu_bin
test edit
/00[1-2]* ||
exit 1
59 echo "=== edit: until 003"
60 .
/mu_bin
test edit
/00[1-3]* ||
exit 1
62 if [[ ! $1 ||
$1 == edit2
]]
64 echo "=== edit: until 004"
65 .
/mu_bin
test edit
/00[1-4]* ||
exit 1
66 echo "=== edit: until 005"
67 .
/mu_bin
test edit
/00[1-5]* ||
exit 1
68 echo "=== edit: until 006"
69 .
/mu_bin
test edit
/00[1-6]* ||
exit 1
71 if [[ ! $1 ||
$1 == edit3
]]
73 echo "=== edit: until 007"
74 .
/mu_bin
test edit
/00[1-7]* ||
exit 1
75 echo "=== edit: until 008"
76 .
/mu_bin
test edit
/00[1-8]* ||
exit 1
77 echo "=== edit: until 009"
78 .
/mu_bin
test edit
/00* ||
exit 1
80 if [[ ! $1 ||
$1 == edit4
]]
82 echo "=== edit: until 010"
83 .
/mu_bin
test edit
/00* edit
/010* ||
exit 1
84 echo "=== edit: until 011"
85 .
/mu_bin
test edit
/00* edit
/01[01]* ||
exit 1
86 echo "=== edit: until 012"
87 .
/mu_bin
test edit
/00* edit
/01[0-2]* ||
exit 1