blob: b736fb28553b11c0bfd649c050e3541ce9f605d0 (
plain) (
tree)
|
|
#!/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
test_it --const-interp $a `basename $a .c`.constants.txt;
done;
echo "== INTERVALS ABSTRACT DOMAIN"
for a in sources/*.c; do
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;
|