From d7d7b781e91abbefca7e7a037c4109b3db89f958 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Thu, 14 Sep 2017 15:04:07 +0100 Subject: Better failure reporting on mono tests --- test/mono/test.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/mono/test.sh') 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 -- cgit v1.2.3