From 8b13b71a80b89e8494cc550c65d36e2eca7c6c79 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Wed, 7 Feb 2018 19:01:32 +0000 Subject: Remove warnings during re-writing Turn of warnings so we don't get warnings for generated code, this fixes the false-positive warnings in the riscv test suite. Also use basename in test/riscv/run_tests.sh to not print long paths --- src/sail.ml | 1 + test/riscv/run_tests.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sail.ml b/src/sail.ml index dac2f841..1016966e 100644 --- a/src/sail.ml +++ b/src/sail.ml @@ -232,6 +232,7 @@ let main() = then Printf.printf "Sail 2.0\n" else let out_name, ast, type_envs = load_files Type_check.initial_env !opt_file_arguments in + Util.opt_warnings := false; (* Don't show warnings during re-writing for now *) (*let _ = Printf.eprintf "Type checked, next to pretty print" in*) begin diff --git a/test/riscv/run_tests.sh b/test/riscv/run_tests.sh index dd19bd72..ab121d61 100755 --- a/test/riscv/run_tests.sh +++ b/test/riscv/run_tests.sh @@ -61,9 +61,9 @@ fi for test in $DIR/tests/*.elf; do if $SAILDIR/riscv/riscv "$test" >"${test/.elf/.out}" 2>&1 && grep -q SUCCESS "${test/.elf/.out}" then - green "$test" "ok" + green `basename $test` "ok" else - red "$test" "fail" + red `basename $test` "fail" fi done -- cgit v1.2.3