repositories
/
mc1516pa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yet another tiny update
[mc1516pa.git]
/
modelchecker
/
test.sh
diff --git
a/modelchecker/test.sh
b/modelchecker/test.sh
index
205c472
..
2aa9aea
100755
(executable)
--- a/
modelchecker/test.sh
+++ b/
modelchecker/test.sh
@@
-1,15
+1,21
@@
#!/bin/bash
#!/bin/bash
+set -e
-for testscreen in tests/*; do
+make
+cd tests
+./generate_tests.sh
+cd ..
+TOTAL=0
+PASSED=0
+for testscreen in tests/[^g]*; do
NUM="$(basename "$(echo $testscreen | cut -d'.' -f1)")"
OUT="$(./main "$testscreen" 2>&1| grep -Po "(?<=Satcount: )\d+(?=\.)")"
NUM="$(basename "$(echo $testscreen | cut -d'.' -f1)")"
OUT="$(./main "$testscreen" 2>&1| grep -Po "(?<=Satcount: )\d+(?=\.)")"
- echo "Output: $OUT"
if [ "$NUM" -ne "$OUT" ]; then
if [ "$NUM" -ne "$OUT" ]; then
- echo "$testscreen failed"
- echo "Expected: $NUM"
- echo "Got: $OUT"
- cat "$testscreen"
+ echo "$testscreen failed, expected: $NUM, got: $OUT."
+ echo "'$(cat "$testscreen")'"
else
else
- echo "$testscreen passed"
+ PASSED=$((PASSED+1))
fi
fi
+ TOTAL=$((TOTAL+1))
done
done
+echo "$((TOTAL-PASSED))/$TOTAL failed"