3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2026-04-29 01:13:38 +00:00

allow running SBY tests with an external examples directory

This commit is contained in:
Jannis Harder 2025-04-28 15:53:22 +02:00
parent 1b36b27d90
commit c8800ecd34
13 changed files with 107 additions and 39 deletions

View file

@ -24,16 +24,28 @@ else
SBY_MAIN := $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/make/run_sby.py)
endif
ifeq ($(SBY_EXAMPLES),)
EXAMPLE_DIR := ../docs/examples
else
EXAMPLE_DIR := $(SBY_EXAMPLES)
endif
CHECK_COLLECT := $(shell python3 make/collect_tests.py --check --output make/rules/collect.mk --examples $(EXAMPLE_DIR))
ifneq (,$(CHECK_COLLECT))
$(warning $(CHECK_COLLECT))
endif
ifeq (nt-unix-like,$(OS_NAME))
SBY_MAIN := $(shell cygpath -w $(SBY_MAIN))
endif
export SBY_MAIN
make/rules/collect.mk: make/collect_tests.py
python3 make/collect_tests.py
python3 make/collect_tests.py --output $@ --examples $(EXAMPLE_DIR)
make/rules/test/%.mk:
python3 make/test_rules.py $<
python3 make/test_rules.py --rule $@ --source $<
ifneq (help,$(MAKECMDGOALS))