Allow any definition of KEEP to keep temp files

This commit is contained in:
mrg 2022-10-20 14:31:26 -07:00
parent ba274c0a38
commit aeca2c6b88
1 changed files with 1 additions and 2 deletions

View File

@ -6,7 +6,6 @@ include $(TOP_DIR)/openram.mk
ARGS ?=
TEST_TECHS ?= scn4m_subm freepdk45
TECHS ?= scn4m_subm freepdk45 sky130
KEEP ?= false
TEST_DIR = $(TOP_DIR)/compiler/tests
TEST_SRCS = $(sort $(notdir $(wildcard $(TEST_DIR)/*_test.py)))
@ -122,7 +121,7 @@ $(TEST_BASES):
@mkdir -p results/$*/tmp
@$(DOCKER_CMD) sh -c ". /home/cad-user/.bashrc && sleep 1 && python3 -u $(OPENRAM_DIR)/$(getfile).py \
-t $(gettech) -k -v $(ARGS) -p $(OPENRAM_DIR)/results/$* > $(OPENRAM_DIR)/results/$*.out 2>&1 && touch $(OPENRAM_DIR)/results/$*.ok || touch $(OPENRAM_DIR)/results/$*.bad"
ifeq ($(KEEP),true)
ifdef $(KEEP)
@test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" || echo "$* ... FAIL!"
else
@test -f $(TOP_DIR)/compiler/tests/results/$*.ok && echo "$* ... PASS!" && rm -rf $(TOP_DIR)/compiler/tests/results/$* || echo "$* ... FAIL!"