mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
New bench target in root Makefile
bench/Makefile now builds the test utility if not already built
This commit is contained in:
parent
51f5a00224
commit
a31285d3ad
2 changed files with 16 additions and 11 deletions
5
Makefile
5
Makefile
|
|
@ -25,6 +25,9 @@ test: $(TEST)
|
||||||
$(TEST): $(LIB)
|
$(TEST): $(LIB)
|
||||||
$(COMP) $(FLAGS) $(DIRS) $(TEST)
|
$(COMP) $(FLAGS) $(DIRS) $(TEST)
|
||||||
|
|
||||||
|
bench: $(TEST)
|
||||||
|
cd bench && $(MAKE)
|
||||||
|
|
||||||
log:
|
log:
|
||||||
cat _build/$(LOG) || true
|
cat _build/$(LOG) || true
|
||||||
|
|
||||||
|
|
@ -43,4 +46,4 @@ reinstall: all
|
||||||
ocamlfind remove msat || true
|
ocamlfind remove msat || true
|
||||||
ocamlfind install msat $(TO_INSTALL)
|
ocamlfind install msat $(TO_INSTALL)
|
||||||
|
|
||||||
.PHONY: clean doc all install uninstall reinstall
|
.PHONY: clean doc all bench install uninstall reinstall
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,27 @@
|
||||||
SOLVER :=../sat_solve.native
|
SOLVER :=../sat_solve.native
|
||||||
OPTIONS :=-t 30s -s 1G
|
OPTIONS :=-t 30s -s 1G
|
||||||
|
|
||||||
LOGDIR := $(shell echo "logs/`git rev-parse HEAD`")
|
LOGDIR := $(shell echo "./logs/`git rev-parse HEAD`")
|
||||||
LOGDIRE := $(shell echo "logs\/`git rev-parse HEAD`")
|
INDEX := $(shell echo "./$(LOGDIR)/index")
|
||||||
INDEX := $(shell echo "$(LOGDIR)/index")
|
|
||||||
CNF := $(shell find -L ./ -name "*.cnf" -type f)
|
CNF := $(shell find -L ./ -name "*.cnf" -type f)
|
||||||
DONE := $(addprefix $(LOGDIR)/raw/, $(CNF:.cnf=.done))
|
DONE := $(addprefix $(LOGDIR)/raw/, $(CNF:.cnf=.done))
|
||||||
|
|
||||||
PROVER := $(shell echo "$(LOGDIR)/prover")
|
PROVER := $(shell echo "./$(LOGDIR)/prover")
|
||||||
CMD := $(PROVER) $(OPTIONS)
|
CMD := $(PROVER) $(OPTIONS)
|
||||||
|
|
||||||
all: $(INDEX)
|
all: $(INDEX)
|
||||||
@echo "All done."
|
|
||||||
|
|
||||||
$(INDEX): $(PROVER) $(DONE)
|
$(INDEX): $(PROVER) $(DONE)
|
||||||
@echo "Ended at `date +'%H:%M:%S %d/%m/%Y'`" > $(INDEX)
|
@echo "Bench ended for commit `git rev-parse HEAD`" | tee -a $(INDEX)
|
||||||
@echo "Index created"
|
@echo "Ended at `date +'%H:%M:%S %d/%m/%Y'`" | tee -a $(INDEX)
|
||||||
|
|
||||||
$(PROVER):
|
$(PROVER): $(SOLVER)
|
||||||
@echo "Creating log directory..." && mkdir -p $(LOGDIR)/raw
|
@mkdir -p $(LOGDIR)/raw
|
||||||
@echo "Copying prover..." && cp $(SOLVER) $(PROVER)
|
@cp $(SOLVER) $(PROVER)
|
||||||
|
@echo "Bench started for commit `git rev-parse HEAD`"
|
||||||
|
|
||||||
|
$(SOLVER):
|
||||||
|
cd .. && $(MAKE)
|
||||||
|
|
||||||
$(LOGDIR)/raw/%.done : $(PROVER)
|
$(LOGDIR)/raw/%.done : $(PROVER)
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue