sidekick/bench/run
2014-11-04 20:40:08 +01:00

26 lines
542 B
Bash
Executable file

#!/bin/bash
CURDIR=`dirname $0`
SOLVER="$CURDIR/../sat_solve.native"
solvertest () {
for f in `find -L $1 -name *.cnf -type f`
do
echo -ne "\r\033[KTesting $f..."
"$SOLVER" -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