mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-02 08:33:46 +00:00
Add common.mk
This commit is contained in:
parent
144da16583
commit
413b9a4639
3 changed files with 53 additions and 38 deletions
|
|
@ -1,3 +1,10 @@
|
|||
ifneq ($(wildcard ../Makefile.conf),)
|
||||
include ../Makefile.conf
|
||||
endif
|
||||
|
||||
OVERRIDE_MAIN=1
|
||||
include ./common.mk
|
||||
|
||||
# Tests that generate Makefile with gen_tests_makefile.py
|
||||
MK_TEST_DIRS =
|
||||
MK_TEST_DIRS += ./arch/analogdevices
|
||||
|
|
@ -106,22 +113,6 @@ endif
|
|||
@echo ""
|
||||
-@$(MAKE) --no-print-directory summary
|
||||
|
||||
.PHONY: summary
|
||||
summary:
|
||||
@pass=$$(find . -type f -name '*.result' -exec grep '^PASS$$' {} + | wc -l); \
|
||||
fail=$$(find . -type f -name '*.result' -exec grep '^FAIL$$' {} + | wc -l); \
|
||||
total=$$((pass + fail)); \
|
||||
echo "=========================="; \
|
||||
echo "Tests: $$total"; \
|
||||
echo "Passed: $$pass"; \
|
||||
echo "Failed: $$fail"; \
|
||||
echo "=========================="; \
|
||||
if [ $$fail -ne 0 ]; then \
|
||||
echo; \
|
||||
$(MAKE) --no-print-directory report; \
|
||||
fi; \
|
||||
test $$fail -eq 0
|
||||
|
||||
clean:
|
||||
@rm -rf ./asicworld/*.out ./asicworld/*.log
|
||||
@rm -rf ./hana/*.out ./hana/*.log
|
||||
|
|
@ -134,12 +125,3 @@ clean:
|
|||
@rm -f $(addsuffix /run-test.mk,$(MK_TEST_DIRS))
|
||||
@find . -name '*.result' -type f -exec rm -f {} +
|
||||
@find . -mindepth 2 \( -path './sva*' -o -path './unit*' \) -prune -o -name 'Makefile' -type f -exec rm -f {} +
|
||||
|
||||
.PHONY: report
|
||||
report:
|
||||
@echo "=========================="
|
||||
@echo "Failing tests:"
|
||||
@find . -name '*.result' -type f -exec grep -H '^FAIL$$' {} + \
|
||||
| cut -d: -f1 \
|
||||
| sed 's|^\./||; s|\.result$$||'
|
||||
@echo "=========================="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue