mirror of
https://github.com/c-cube/sidekick.git
synced 2026-01-25 19:06:43 -05:00
test: refactor a bit so that benchs are run by dune
This commit is contained in:
parent
9a8f0e9d82
commit
1c188afb6b
3 changed files with 12 additions and 3 deletions
2
Makefile
2
Makefile
|
|
@ -23,8 +23,6 @@ build-dev:
|
|||
test:
|
||||
@echo "run tests…"
|
||||
@OCAMLRUNPARAM=b dune runtest --force --no-buffer
|
||||
@echo "run benchmarks…"
|
||||
@/usr/bin/time -f "%e" ./tests/run sat
|
||||
|
||||
enable_log:
|
||||
cd src/core; ln -sf log_real.ml log.ml
|
||||
|
|
|
|||
|
|
@ -10,14 +10,23 @@
|
|||
(alias
|
||||
(name runtest)
|
||||
(deps test_api.exe)
|
||||
(locks test)
|
||||
(action (run %{deps})))
|
||||
|
||||
(alias
|
||||
(name runtest)
|
||||
(deps ./icnf-solve/icnf_solve.exe Makefile (source_tree regression))
|
||||
(locks test)
|
||||
(action (run make test-icnf)))
|
||||
|
||||
(alias
|
||||
(name runtest)
|
||||
(deps ./../src/sudoku/sudoku_solve.exe Makefile (source_tree sudoku))
|
||||
(locks test)
|
||||
(action (run make test-sudoku)))
|
||||
|
||||
(alias
|
||||
(name runtest)
|
||||
(deps ./../src/main/main.exe ./run (source_tree .))
|
||||
(locks test)
|
||||
(action (run /usr/bin/time -f "%e" ./run sat)))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
CURDIR=`dirname $0`
|
||||
SOLVER="$CURDIR/../_build/default/src/main/main.exe"
|
||||
SOLVER="$CURDIR/../src/main/main.exe"
|
||||
|
||||
solvertest () {
|
||||
for f in `find -L $1 -type f -name '*.cnf' # -o -name '*.smt2'`
|
||||
|
|
@ -18,5 +18,7 @@ solvertest () {
|
|||
echo -e "\r\033[K\e[32m[OK]\e[0m $3/$2"
|
||||
}
|
||||
|
||||
echo "run benchmarks…"
|
||||
|
||||
solvertest "$CURDIR/sat/" "Sat" $1
|
||||
solvertest "$CURDIR/unsat/" "Unsat" $1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue