diff options
| author | Brian Campbell | 2018-02-23 18:29:55 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-02-23 18:30:17 +0000 |
| commit | 60abec7cf41b95a5e7aeabd129444a1eb30ed9c1 (patch) | |
| tree | 19700268b9ace4ecbf6da1699950f3ea205012be | |
| parent | da1cca5858a6cfefa68423dd5e45e4c5ac1c5227 (diff) | |
Make mono test harness nicer
| -rwxr-xr-x | test/mono/run_tests.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/test/mono/run_tests.sh b/test/mono/run_tests.sh index 4be1f434..27733c4c 100755 --- a/test/mono/run_tests.sh +++ b/test/mono/run_tests.sh @@ -52,10 +52,17 @@ mkdir -p "$OUTPUTDIR" echo > log -for i in `ls $TESTSDIR/pass`; +if [ -z "$1" ] +then + TESTS=`ls $TESTSDIR/pass` +else + TESTS="$@" +fi + +for i in $TESTS; do - echo "Running test $i" >> log cd "$DIR" + echo "Running test $i" >> log if "$SAILDIR/sail" -lem -lem_mwords -lem_lib Test_extra -o out $(< "$TESTSDIR/pass/$i") &>>log; then mv out.lem out_types.lem "$OUTPUTDIR" @@ -78,9 +85,9 @@ do sail_operators_mwords.ml sail_instr_kinds.ml \ prompt_monad.ml prompt.ml state_monad.ml state.ml \ test_extra.ml out_types.ml out.ml ../test.ml \ - -o test &>>log + -o test &>>"$DIR/log" then - if ./test &>>log + if ./test &>>"$DIR/log" then green "tested $i expecting pass" "pass" else @@ -95,7 +102,7 @@ do else red "tested $i expecting pass" "failed to generate Lem" fi - echo >> log + echo >> "$DIR/log" done finish_suite "monomorphisation tests" |
