mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
fix test; make test scripts PWD-independent
This commit is contained in:
parent
f5563a554f
commit
e95dec0663
4 changed files with 11 additions and 9 deletions
1
Makefile
1
Makefile
|
|
@ -26,7 +26,6 @@ test-full: $(TEST)
|
|||
|
||||
$(TEST): $(LIB)
|
||||
$(COMP) $(FLAGS) $(DIRS) $(TEST)
|
||||
cp $(TEST) tests/main && rm $(TEST)
|
||||
|
||||
log:
|
||||
cat _build/$(LOG) || true
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
CURDIR=`dirname $0`
|
||||
SOLVER="$CURDIR/../test.native"
|
||||
|
||||
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
|
||||
"$SOLVER" -t 5s -s 1G $f | grep $2 > /dev/null 2> /dev/null
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ];
|
||||
then
|
||||
|
|
|
|||
|
|
@ -425,5 +425,4 @@ p cnf 90 415
|
|||
63 62 61 60 59 58 57 56 55 0
|
||||
72 71 70 69 68 67 66 65 64 0
|
||||
81 80 79 78 77 76 75 74 73 0
|
||||
90 89 88 87 86 85 84 83 82
|
||||
0
|
||||
90 89 88 87 86 85 84 83 82 0
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
CURDIR=`dirname $0`
|
||||
SOLVER="$CURDIR/../test.native"
|
||||
|
||||
solvertest () {
|
||||
for f in `find -L $1 -name *.cnf -type f`
|
||||
do
|
||||
echo -ne "\r\033[KTesting $f..."
|
||||
tests/main -t 30s -s 1G $f | grep $2 > /dev/null 2> /dev/null
|
||||
"$SOLVER" -t 30s -s 1G $f | grep $2 > /dev/null 2> /dev/null
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ];
|
||||
then
|
||||
|
|
@ -15,5 +18,5 @@ solvertest () {
|
|||
echo -e "\r\033[K\e[32m[OK]\e[0m $2"
|
||||
}
|
||||
|
||||
solvertest "tests/sat/" "Sat"
|
||||
solvertest "tests/unsat/" "Unsat"
|
||||
solvertest "$CURDIR/sat/" "Sat"
|
||||
solvertest "$CURDIR/unsat/" "Unsat"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue