3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-06 00:50:57 +00:00

CMake: Add wrapper for test-docs

Also skip calling `tail` on stubnets log outputs.

Fix auxprog prefixes

i.e. if we've set `YOSYS_PROGRAM_PREFIX=why`, we shouldn't be trying to call `build/yosys` when building docs (because if we've done a clean build it doesn't exist).
I suspect this also affects tests, but I was working on docs when I noticed it.
This commit is contained in:
Krystine Sherwin 2026-06-03 16:53:25 +12:00
parent 2889c73338
commit e1931596ae
No known key found for this signature in database
3 changed files with 12 additions and 8 deletions

View file

@ -268,12 +268,12 @@ extract:
@cd .. && diff -U 20 backends/functional/smtlib.cc backends/functional/smtlib_rosette.cc \
> docs/source/generated/functional/rosette.diff || true
$(YOSYS) --help | sed "s%$(BUILD_DIR)/yosys%yosys%g" - >source/generated/yosys
@$(YOSYS) --help | sed "s%$(YOSYS)%$(PROGRAM_PREFIX)yosys%g" - >source/generated/yosys
@$(YOSYS_SMTBMC) --help >source/generated/yosys-smtbmc
@$(YOSYS_WITNESS) --help >source/generated/yosys-witness
@$(YOSYS_CONFIG) --help | sed "s%$(BUILD_DIR)/yosys-config%yosys-config%g" - >source/generated/yosys-config
@$(YOSYS_FILTERLIB) --help 2>source/generated/yosys-filterlib || true
@$(ABC) --help 2>&1 >/dev/null | sed "s%$(BUILD_DIR)/yosys-abc%yosys-abc%g" - >source/generated/yosys-abc
@$(YOSYS_CONFIG) --help | sed "s%$(YOSYS_CONFIG)%$(PROGRAM_PREFIX)yosys-config%g" - >source/generated/yosys-config
@$(YOSYS_FILTERLIB) --help 2>&1 >/dev/null | sed "s%filterlib%$(PROGRAM_PREFIX)yosys-filterlib%g" - >source/generated/yosys-filterlib
@$(ABC) --help 2>&1 >/dev/null | sed "s%$(ABC)%$(PROGRAM_PREFIX)yosys-abc%g" - >source/generated/yosys-abc
.PHONY: gen
gen:

View file

@ -10,7 +10,6 @@ test: stubnets.so
@$(YOSYS) -ql test1.log -m ./stubnets.so test.v -p "stubnets" >/dev/null 2>&1
@$(YOSYS) -ql test2.log -m ./stubnets.so test.v -p "opt; stubnets" >/dev/null 2>&1
@$(YOSYS) -ql test3.log -m ./stubnets.so test.v -p "techmap; opt; stubnets -report_bits" >/dev/null 2>&1
@tail test1.log test2.log test3.log
stubnets.so: stubnets.cc
@$(YOSYS_CONFIG) --exec --cxx --cxxflags --ldflags -o $@ -shared $^ --ldlibs >/dev/null 2>&1