3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-09 17:31:59 +00:00

tests: further silence outputs

This commit is contained in:
Emil J. Tywoniak 2025-09-19 19:08:29 +02:00
parent 7f030c986c
commit 05a09f34e7
2 changed files with 4 additions and 6 deletions

View file

@ -936,26 +936,24 @@ SH_ABC_TEST_DIRS += tests/alumacc
seed-tests: $(SH_TEST_DIRS:%=seed-tests/%) seed-tests: $(SH_TEST_DIRS:%=seed-tests/%)
.PHONY: seed-tests/% .PHONY: seed-tests/%
seed-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS) seed-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS)
+cd $* && bash run-test.sh $(SEEDOPT) +cd $* && /usr/bin/env time -f "PASS $* in %e seconds" sh -c 'bash run-test.sh $(SEEDOPT) 2>/dev/null >/dev/null'
+@echo "...passed tests in $*"
# abcopt-tests/ is a dummy string, not a directory # abcopt-tests/ is a dummy string, not a directory
.PHONY: abcopt-tests .PHONY: abcopt-tests
abcopt-tests: $(SH_ABC_TEST_DIRS:%=abcopt-tests/%) abcopt-tests: $(SH_ABC_TEST_DIRS:%=abcopt-tests/%)
abcopt-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS) abcopt-tests/%: %/run-test.sh $(TARGETS) $(EXTRA_TARGETS)
+cd $* && bash run-test.sh $(ABCOPT) $(SEEDOPT) +cd $* && /usr/bin/env time -f "PASS $* in %e seconds" sh -c 'bash run-test.sh $(ABCOPT) $(SEEDOPT) 2>/dev/null >/dev/null'
+@echo "...passed tests in $*"
# makefile-tests/ is a dummy string, not a directory # makefile-tests/ is a dummy string, not a directory
.PHONY: makefile-tests .PHONY: makefile-tests
makefile-tests: $(MK_TEST_DIRS:%=makefile-tests/%) makefile-tests: $(MK_TEST_DIRS:%=makefile-tests/%)
# this target actually emits .mk files # this target actually emits .mk files
.NOTINTERMEDIATE: %.mk
%.mk: %.mk:
+cd $(dir $*) && bash run-test.sh +cd $(dir $*) && bash run-test.sh
# this one spawns submake on each # this one spawns submake on each
makefile-tests/%: %/run-test.mk $(TARGETS) $(EXTRA_TARGETS) makefile-tests/%: %/run-test.mk $(TARGETS) $(EXTRA_TARGETS)
stdbuf -oL -eL $(MAKE) -C $* -f run-test.mk stdbuf -oL -eL $(MAKE) -C $* -f run-test.mk
+@echo "...passed tests in $*"
test: makefile-tests abcopt-tests seed-tests test: makefile-tests abcopt-tests seed-tests
@echo "" @echo ""

View file

@ -9,7 +9,7 @@ generate_target() {
echo "all: $target_name" echo "all: $target_name"
echo ".PHONY: $target_name" echo ".PHONY: $target_name"
echo "$target_name:" echo "$target_name:"
printf "\t@/usr/bin/env time -f \"PASS $target_name %%e seconds\" $test_command >/dev/null 2>/dev/null\n" printf "\t@/usr/bin/env time -f \"PASS $target_name %%e seconds\" sh -c %q\n" "{ $test_command ;} >/dev/null 2>/dev/null"
} }
# $ generate_ys_test ys_file [yosys_args] # $ generate_ys_test ys_file [yosys_args]