From f5563a554f344a30595942fdfae95afcc5290f5b Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Tue, 4 Nov 2014 17:41:47 +0100 Subject: [PATCH] Test utility now compiled to native code Added bench/run --- Makefile | 2 +- bench/run | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 bench/run diff --git a/Makefile b/Makefile index 0a32cb6f..9885595e 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ COMP=ocamlbuild -log $(LOG) -use-ocamlfind -package num,zarith,unix,str -classic FLAGS= DIRS=-Is sat,smt,common,util DOC=msat.docdir/index.html -TEST=test.d.byte +TEST=test.native NAME=msat diff --git a/bench/run b/bench/run new file mode 100755 index 00000000..c8b62ac5 --- /dev/null +++ b/bench/run @@ -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