X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=modelchecker%2Ftest.sh;h=2aa9aea07adeea24529a74be83058d031b784180;hb=0212b386d85354399a194538538c0da541e987ea;hp=e34ffaeec7ac815c6b6fa07c7738a06b5532f2e6;hpb=259ed7dfe69f50fd1b4967b272b094f1b2b50493;p=mc1516pa.git diff --git a/modelchecker/test.sh b/modelchecker/test.sh index e34ffae..2aa9aea 100755 --- a/modelchecker/test.sh +++ b/modelchecker/test.sh @@ -1,16 +1,21 @@ #!/bin/bash +set -e +make +cd tests +./generate_tests.sh +cd .. TOTAL=0 PASSED=0 -for testscreen in tests/*; do +for testscreen in tests/[^g]*; do NUM="$(basename "$(echo $testscreen | cut -d'.' -f1)")" OUT="$(./main "$testscreen" 2>&1| grep -Po "(?<=Satcount: )\d+(?=\.)")" if [ "$NUM" -ne "$OUT" ]; then echo "$testscreen failed, expected: $NUM, got: $OUT." - cat "$testscreen" + echo "'$(cat "$testscreen")'" else PASSED=$((PASSED+1)) fi TOTAL=$((TOTAL+1)) done -echo "$PASSED/$TOTAL passed" +echo "$((TOTAL-PASSED))/$TOTAL failed"