Test utility now compiled to native code

Added bench/run
This commit is contained in:
Guillaume Bury 2014-11-04 17:41:47 +01:00
parent ce7254f80f
commit f5563a554f
2 changed files with 26 additions and 1 deletions

View file

@ -5,7 +5,7 @@ COMP=ocamlbuild -log $(LOG) -use-ocamlfind -package num,zarith,unix,str -classic
FLAGS= FLAGS=
DIRS=-Is sat,smt,common,util DIRS=-Is sat,smt,common,util
DOC=msat.docdir/index.html DOC=msat.docdir/index.html
TEST=test.d.byte TEST=test.native
NAME=msat NAME=msat

25
bench/run Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
CURDIR=`dirname $0`
solvertest () {
for f in `find -L $1 -name *.cnf -type f`
do
echo -ne "\r\033[KTesting $f..."
"$CURDIR/../tests/main" -t 5s -s 1G $f | grep $2 > /dev/null 2> /dev/null
RET=$?
if [ $RET -ne 0 ];
then
echo -e "\r\033[K\e[31m[KO]\e[0m $f"
exit 2
fi
done
echo -e "\r\033[K\e[32m[OK]\e[0m $2"
}
all () {
solvertest "$CURDIR/flatgraph/" "Sat"
solvertest "$CURDIR/morphgraph/" "Sat"
}
time all