summaryrefslogtreecommitdiff
path: root/tests/test.sh
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-21 17:57:06 +0200
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-05-21 17:57:06 +0200
commit4204d25a2d277af1c16f55ee488e42c7b79bba1f (patch)
tree81f62443a6466ca35719588836038c62f7ac3485 /tests/test.sh
parent4d59f3a805d0cca882caab353ac8ec0dd4c04f73 (diff)
downloadSemVerif-Projet-4204d25a2d277af1c16f55ee488e42c7b79bba1f.tar.gz
SemVerif-Projet-4204d25a2d277af1c16f55ee488e42c7b79bba1f.zip
All tests pass except one !
Diffstat (limited to 'tests/test.sh')
-rwxr-xr-xtests/test.sh45
1 files changed, 29 insertions, 16 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 443868a..b736fb2 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -1,26 +1,39 @@
#!/bin/bash
+function test_it {
+ if ../analyze $1 $2 > /tmp/analyze_out.txt;
+ then
+ cat /tmp/analyze_out.txt | uniq | tr -d " \\n" > /tmp/analyze_out_2.txt;
+ cat results/$3 | uniq | tr -d " \\n" > /tmp/expected_out_2.txt;
+ if diff -B /tmp/analyze_out_2.txt /tmp/expected_out_2.txt >/dev/null; then
+ echo "OK $2"
+ else
+ cat /tmp/analyze_out.txt | grep Output > /tmp/analyze_out_3.txt;
+ cat results/$3 | grep Output > /tmp/expected_out_3.txt;
+ if diff -B /tmp/analyze_out_3.txt /tmp/expected_out_3.txt >/dev/null; then
+ echo "(TR) $2"
+ else
+ echo "FAIL $2"
+ fi;
+ fi;
+ else
+ echo "TODO $2"
+ fi;
+}
+
echo "== CONSTANT ABSTRACT DOMAIN"
for a in sources/*.c; do
- if ../analyze --const-interp $a > /tmp/analyze_out.txt;
- then
- if diff -B /tmp/analyze_out.txt results/`basename -s .c $a`.constants.txt > /dev/null
- then echo "OK $a"
- else echo "FAIL $a"
- fi
- else echo "TODO $a";
- fi;
+ test_it --const-interp $a `basename $a .c`.constants.txt;
done;
echo "== INTERVALS ABSTRACT DOMAIN"
for a in sources/*.c; do
- if ../analyze --interv-interp $a > /tmp/analyze_out.txt;
- then
- if diff -B /tmp/analyze_out.txt results/`basename -s .c $a`.intervals.txt > /dev/null
- then echo "OK $a"
- else echo "FAIL $a"
- fi
- else echo "TODO $a";
- fi;
+ test_it --interv-interp $a `basename $a .c`.intervals.txt;
+done;
+
+
+echo "== RELATIONNAL ABSTRACT DOMAIN"
+for a in sources/*.c; do
+ test_it --rel-interp $a `basename $a .c`.polyhedra.txt;
done;