X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Frun;fp=ocaml%2Frun;h=7a6436d411a8932935b9d81041079d41647734c9;hb=bd621e95f496a5cd40ca75548f32c063212b8987;hp=0000000000000000000000000000000000000000;hpb=eb8bb784b35d303a1c239f30008cba79f658f4b3;p=fireball-separation.git diff --git a/ocaml/run b/ocaml/run new file mode 100644 index 0000000..7a6436d --- /dev/null +++ b/ocaml/run @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +file=`mktemp` + +echo +echo "Running test. Log file: $file." +echo + +trap 'echo' SIGINT + +if ( ./test4.out 2>&1 | tee $file | stdbuf -o0 grep -Po '(?<=measure=)[^ ]*' | stdbuf -o0 tr '\n' ' ') +then { + rm $file + echo + echo 'Test succeeded' +} +else { + echo '' + echo 'Test failed or interrupted' + echo "Please have a look at log file: $file ." +} +fi