Commit 76c4e1d4 authored by MARCHE Claude's avatar MARCHE Claude

moved realizations checking in a separate script

parent fee9713d
......@@ -128,9 +128,11 @@ else
echo "Counterexample regression tests succeeded. " >> $REPORT
fi
# check realizations
misc/check-realizations.sh >> $REPORT
# replay proofs
examples/regtests.sh --check-realizations &> $OUT
examples/regtests.sh &> $OUT
if test "$?" != "0" ; then
SUBJECT="$SUBJECT failed"
echo "Proof replay failed" >> $REPORT
......@@ -144,9 +146,9 @@ cp $OUT $REPORTDIR/regtests-$DATE
echo "Ending time (UTC): "`date --utc +%H:%M` >> $REPORT
# 3-line summary + 4 lines check realizations
# 3-line summary
echo "" >> $REPORT
tail -7 $OUT >> $REPORT
tail -3 $OUT >> $REPORT
echo "" >> $REPORT
# output the diff against previous run
......
......@@ -2,10 +2,6 @@
# regression tests for why3
REPLAYOPT=""
# Test realization too
CHECK_REALIZATION=""
# Don't test the rest of examples, only the realizations
ONLY_REALIZATION=""
while test $# != 0; do
case "$1" in
......@@ -19,13 +15,6 @@ case "$1" in
REPLAYOPT="$REPLAYOPT --prover $2"
shift
;;
"--check-realizations")
CHECK_REALIZATION="true"
;;
"--only-realizations")
ONLY_REALIZATION="true"
CHECK_REALIZATION="true"
;;
*)
echo "$0: Unknown option '$1'"
exit 2
......@@ -35,7 +24,6 @@ done
TMP=$PWD/why3regtests.out
TMPERR=$PWD/why3regtests.err
TMPREAL=$(mktemp -d /tmp/why3realizations-XXXXXXX)
# Current directory is /examples
cd `dirname $0`
......@@ -49,41 +37,6 @@ export total=0
export sessions=""
export shapes=""
test_generated () {
# Current directory is /why3
mkdir -p $TMPREAL/lib
echo "Testing isabelle realizations"
# First copy current realizations in a tmp directory
cp -r ../lib/isabelle/ $TMPREAL/lib/
# We want to use the makefile to be sure to check exhaustively the
# realizations that are built
make -C .. GENERATED_PREFIX_ISABELLE="$TMPREAL/lib/isabelle" update-isabelle > /dev/null 2> /dev/null
TMPDIFF=`diff -r -q -x '*.bak' -x '*~' -x '*.aux' ../lib/isabelle $TMPREAL/lib/isabelle`
if test "$TMPDIFF" = "" ; then
printf "Isabelle realizations OK\n"
else
printf "ISABELLE REALIZATIONS FAILED, please regenerate and prove them\n"
printf "$TMPDIFF\n"
printf "Generated realizations are in /tmp. Use --only-realizations to only test realizations\n"
res=1
fi
echo "Testing coq realizations"
# First copy current realizations in a tmp directory
cp -r ../lib/coq/ $TMPREAL/lib/
# We want to use the makefile to be sure to check exhaustively the
# realizations that are built
make -C .. GENERATED_PREFIX_COQ="$TMPREAL/lib/coq" update-coq > /dev/null 2> /dev/null
TMPDIFF=`diff -r -q -x '*.bak' -x '*~' -x '*.aux' ../lib/coq $TMPREAL/lib/coq`
if test "$TMPDIFF" = "" ; then
printf "Coq realizations OK\n"
else
printf "COQ REALIZATIONS FAILED, please regenerate and prove it\n"
printf "$TMPDIFF\n"
printf "Generated realizations are in /tmp. Use --only-realizations to only test realizations\n"
res=1
fi
}
run_dir () {
for f in `ls $1/*/why3session.xml`; do
......@@ -112,48 +65,42 @@ run_dir () {
shapes="$shapes $1/*/why3shapes.*"
}
if test "$ONLY_REALIZATION" = "" ; then
echo "=== Standard Library ==="
run_dir stdlib
echo ""
echo "=== Tests ==="
# there's no session there...
# run_dir tests
run_dir tests-provers
echo ""
echo "=== Check Builtin translation ==="
run_dir check-builtin
echo ""
echo "=== BTS ==="
run_dir bts
echo ""
echo "=== Logic ==="
run_dir logic
run_dir bitvectors "-L bitvectors"
echo ""
echo "=== Programs ==="
run_dir .
run_dir foveoos11-cm
run_dir WP_revisited
run_dir vacid_0_binary_heaps "-L vacid_0_binary_heaps"
run_dir avl "-L avl"
run_dir double_wp "-L double_wp"
run_dir prover "-L prover"
echo ""
echo "Summary : $success/$total"
echo "Sessions size : "`wc -cl $sessions | tail -1`
echo "Shapes size : "`wc -cl $shapes | tail -1`
echo "=== Standard Library ==="
run_dir stdlib
echo ""
echo "=== Tests ==="
# there's no session there...
# run_dir tests
run_dir tests-provers
echo ""
echo "=== Check Builtin translation ==="
run_dir check-builtin
echo ""
echo "=== BTS ==="
run_dir bts
echo ""
echo "=== Logic ==="
run_dir logic
run_dir bitvectors "-L bitvectors"
echo ""
echo "=== Programs ==="
run_dir .
run_dir foveoos11-cm
run_dir WP_revisited
run_dir vacid_0_binary_heaps "-L vacid_0_binary_heaps"
run_dir avl "-L avl"
run_dir double_wp "-L double_wp"
run_dir prover "-L prover"
echo ""
echo "Summary : $success/$total"
echo "Sessions size : "`wc -cl $sessions | tail -1`
echo "Shapes size : "`wc -cl $shapes | tail -1`
fi
if test "$CHECK_REALIZATION" = "true" ; then
test_generated
fi
exit $res
# cd to the directory of this script
cd `dirname $0`
# temporary directory where we generate realizations
TMPREAL=$(mktemp -d /tmp/why3realizations-XXXXXXX)
mkdir -p $TMPREAL/lib
echo "Testing isabelle realizations"
# First copy current realizations in a tmp directory
cp -r ../lib/isabelle/ $TMPREAL/lib/
# We want to use the makefile to be sure to check exhaustively the
# realizations that are built
make -C .. GENERATED_PREFIX_ISABELLE="$TMPREAL/lib/isabelle" update-isabelle > /dev/null 2> /dev/null
TMPDIFF=`diff -r -q -x '*.bak' -x '*~' -x '*.aux' ../lib/isabelle $TMPREAL/lib/isabelle`
if test "$TMPDIFF" = "" ; then
printf "Isabelle realizations OK\n"
else
printf "ISABELLE REALIZATIONS FAILED, please regenerate and prove them\n"
printf "$TMPDIFF\n"
printf "Generated realizations are in $TMPREAL\n"
res=1
fi
echo "Testing coq realizations"
# First copy current realizations in a tmp directory
cp -r ../lib/coq/ $TMPREAL/lib/
# We want to use the makefile to be sure to check exhaustively the
# realizations that are built
make -C .. GENERATED_PREFIX_COQ="$TMPREAL/lib/coq" update-coq > /dev/null 2> /dev/null
TMPDIFF=`diff -r -q -x '*.bak' -x '*~' -x '*.aux' ../lib/coq $TMPREAL/lib/coq`
if test "$TMPDIFF" = "" ; then
printf "Coq realizations OK\n"
else
printf "COQ REALIZATIONS FAILED, please regenerate and prove it\n"
printf "$TMPDIFF\n"
printf "Generated realizations are in $TMPREAL\n"
res=1
fi
......@@ -29,4 +29,4 @@ bin/why3config --detect-provers
make bench
# check that the realizations are ok
examples/regtests.sh --only-realizations
misc/check_realizations.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment