summaryrefslogtreecommitdiff
path: root/test/mono/test.sh
diff options
context:
space:
mode:
authorBrian Campbell2017-09-14 15:04:07 +0100
committerBrian Campbell2017-09-14 15:04:07 +0100
commitd7d7b781e91abbefca7e7a037c4109b3db89f958 (patch)
treeda8c8b7bc99aa6087482e8eb158885d5a08860c8 /test/mono/test.sh
parent47aff351871c9617738557bade7633331acfb07f (diff)
Better failure reporting on mono tests
Diffstat (limited to 'test/mono/test.sh')
-rwxr-xr-xtest/mono/test.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/mono/test.sh b/test/mono/test.sh
index ec1b4638..b82406c3 100755
--- a/test/mono/test.sh
+++ b/test/mono/test.sh
@@ -20,6 +20,8 @@ LOG="$DIR/log"
date > "$LOG"
exec 3< "$DIR/tests"
+set +e
+
while read -u 3 TEST ARGS; do
if [ -z "$TESTONLY" -o "$TEST" = "$TESTONLY" ]; then
# echo "$TEST ocaml"
@@ -32,10 +34,11 @@ while read -u 3 TEST ARGS; do
echo "$TEST lem - ocaml" | tee -a -- "$LOG"
rm -f -- "$OUTDIR"/*
- "$SAILDIR/sail" -lem "$SAILDIR/lib/prelude.sail" "$DIR/$TEST".sail -o "$OUTDIR/testout" $ARGS $@ &>> "$LOG"
- "$LEMDIR/bin/lem" -ocaml -lib "$SAILDIR/src/lem_interp" "$SAILDIR/src/gen_lib/sail_values.lem" "$SAILDIR/src/gen_lib/sail_operators_mwords.lem" "$SAILDIR/src/gen_lib/state.lem" testout_embed_types_sequential.lem testout_embed_sequential.lem -outdir "$OUTDIR" &>> "$LOG"
- cp -- "$DIR"/test.ml "$OUTDIR"
- ocamlc -I "$ZARITH" "$ZARITH/zarith.cma" -dllpath "$ZARITH" -I "$LEMDIR/ocaml-lib" "$LEMDIR/ocaml-lib/extract.cma" -I "$SAILDIR/src/_build/lem_interp" "$SAILDIR/src/_build/lem_interp/extract.cma" sail_values.ml sail_operators_mwords.ml state.ml testout_embed_types_sequential.ml testout_embed_sequential.ml test.ml -o test &>> "$LOG"
- ./test |& tee -a -- "$LOG" || tail -- "$LOG"
+ "$SAILDIR/sail" -lem -lem_sequential -lem_mwords "$SAILDIR/lib/prelude.sail" "$DIR/$TEST".sail -o "$OUTDIR/testout" $ARGS $@ &>> "$LOG" && \
+ "$LEMDIR/bin/lem" -ocaml -lib "$SAILDIR/src/lem_interp" "$SAILDIR/src/gen_lib/sail_values.lem" "$SAILDIR/src/gen_lib/sail_operators_mwords.lem" "$SAILDIR/src/gen_lib/state.lem" testout_embed_types_sequential.lem testout_embed_sequential.lem -outdir "$OUTDIR" &>> "$LOG" && \
+ cp -- "$DIR"/test.ml "$OUTDIR" && \
+ ocamlc -I "$ZARITH" "$ZARITH/zarith.cma" -dllpath "$ZARITH" -I "$LEMDIR/ocaml-lib" "$LEMDIR/ocaml-lib/extract.cma" -I "$SAILDIR/src/_build/lem_interp" "$SAILDIR/src/_build/lem_interp/extract.cma" sail_values.ml sail_operators_mwords.ml state.ml testout_embed_types_sequential.ml testout_embed_sequential.ml test.ml -o test &>> "$LOG" && \
+ ./test |& tee -a -- "$LOG" || \
+ (echo "Failed:"; echo; tail -- "$LOG"; echo; echo)
fi
done