diff --git a/makefile b/makefile index f44ac83..6c49a92 100644 --- a/makefile +++ b/makefile @@ -4,6 +4,7 @@ TEST_FOLDERS := $(subst makefile,, $(MAKEFILESS)) all: run run: + set -e && \ for test in $(TEST_FOLDERS) ; do \ make -C $$test all ; \ done diff --git a/verilator.mk b/verilator.mk index a515340..b63992b 100644 --- a/verilator.mk +++ b/verilator.mk @@ -14,8 +14,12 @@ $(VERILATOR_EXE): lint | $(SOURCES) verilator $(VERILATOR_ARGS) $(SIMFILES) $(SOURCES) > /dev/null run: $(VERILATOR_EXE) - ./$(VERILATOR_EXE) | tee output.txt; ./$(PARSER) $(PROJECT_NAME) $$? output.txt + # https://stackoverflow.com/questions/17757039/equivalent-of-pipefail-in-dash-shell + @mkfifo named_pipe + @tee output.txt < named_pipe & + @./$(VERILATOR_EXE) > named_pipe; ./$(PARSER) $(PROJECT_NAME) $$? output.txt + @rm named_pipe clean: - rm -rf obj_dir - + @rm -rf obj_dir + @rm -f named_pipe