clb.mk and fuzzer.mk: checking only local db with parsedb

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
Alessandro Comodi 2019-01-17 18:33:11 +01:00
parent 13e5fbdf99
commit b8d645fc21
2 changed files with 21 additions and 13 deletions

View File

@ -11,6 +11,9 @@ CLBN ?= 0
INC ?= 50
VAR ?= "CLBN=$$(($(CLBN) + $(INC)))"
ENV_VAR ?= "CLBN=$(CLBN)"
ITER ?= 0
MAX_ITER ?= 10
FUZDIR = ${PWD}
include ../fuzzer.mk
@ -34,7 +37,19 @@ else
endif
${XRAY_MASKMERGE} build/mask_clbx.db $(SEGDATAS)
pushdb:
checkdb:
# If the database presents errors or is incomplete, the fuzzer is rerun.
# When it reaches the maximum number of iterations it fails.
@if [ $(ITER) -gt $(MAX_ITER) ]; then \
echo "Max Iterations reached. Fuzzer unsolvable."; \
exit 1; \
fi
$(MAKE) parsedb || $(MAKE) $(VAR) ITER=$$(($(ITER) + 1)) run
parsedb:
${XRAY_PARSEDB} --strict build/segbits_clbx.db
pushdb: checkdb
ifeq ($(SLICEL),Y)
${XRAY_MERGEDB} clbll_l build/segbits_clbx.db
${XRAY_MERGEDB} clbll_r build/segbits_clbx.db
@ -46,5 +61,5 @@ endif
${XRAY_MERGEDB} mask_clblm_l build/mask_clbx.db
${XRAY_MERGEDB} mask_clblm_r build/mask_clbx.db
.PHONY: database pushdb
.PHONY: database pushdb checkdb parsedb

View File

@ -2,26 +2,19 @@ N ?= 1
SPECIMENS := $(addprefix build/specimen_,$(shell seq -f '%03.0f' $(N)))
SPECIMENS_OK := $(addsuffix /OK,$(SPECIMENS))
ENV_VAR ?=
VAR ?=
ITER ?= 0
MAX_ITER ?= 10
FUZDIR ?= ${PWD}
all: database
$(SPECIMENS_OK):
echo ${ENV_VAR}
mkdir -p build
if [ -f `pwd`/generate.sh ]; then export $(ENV_VAR); bash `pwd`/generate.sh $(subst /OK,,$@); else bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@); fi
if [ -f $(FUZDIR)/generate.sh ]; then export $(ENV_VAR); bash $(FUZDIR)/generate.sh $(subst /OK,,$@); else bash ${XRAY_DIR}/utils/top_generate.sh $(subst /OK,,$@); fi
run:
# If the database presents errors or is incomplete, the fuzzer is rerun.
# When it reaches the maximum number of iterations it fails.
@if [ $(ITER) -gt $(MAX_ITER) ]; then \
echo "Max Iterations reached. Fuzzer unsolvable."; \
exit 1; \
fi
$(MAKE) clean
$(MAKE) database
$(MAKE) pushdb || $(MAKE) $(VAR) ITER=$$(($(ITER) + 1)) run
$(MAKE) pushdb
touch run.ok
clean: