mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-27 04:16:28 +00:00
Integrate tests
This commit is contained in:
parent
ed263d26cc
commit
25b6a1f651
3 changed files with 26 additions and 6 deletions
|
|
@ -480,6 +480,21 @@ yosys_config_script(INSTALL)
|
|||
# Tests.
|
||||
add_subdirectory(tests/unit)
|
||||
# TODO(cmake): other tests
|
||||
add_custom_target(vanilla-test
|
||||
COMMAND make -C ${CMAKE_SOURCE_DIR}/tests vanilla-test
|
||||
BUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
PROGRAM_PREFIX=${YOSYS_PROGRAM_PREFIX}
|
||||
DEPENDS yosys
|
||||
)
|
||||
|
||||
add_custom_target(unit-test
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} --test-dir ${CMAKE_BINARY_DIR}/tests/unit --output-on-failure
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(test
|
||||
DEPENDS vanilla-test unit-test
|
||||
)
|
||||
|
||||
# Docs.
|
||||
add_custom_target(docs-prepare
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
OVERRIDE_MAIN=1
|
||||
include ./common.mk
|
||||
|
||||
SEED ?=
|
||||
ifneq ($(strip $(SEED)),)
|
||||
SEEDOPT_GEN := -S$(SEED)
|
||||
endif
|
||||
|
||||
# Directories with tests not run:
|
||||
# errors
|
||||
# lut
|
||||
|
|
@ -87,7 +92,7 @@ prep: $(MK_TEST_DIRS:%=%/Makefile)
|
|||
.PHONY: force-create
|
||||
# this target actually emits Makefile files
|
||||
%/Makefile: force-create
|
||||
+@cd $* && python3 generate_mk.py
|
||||
+@cd $* && python3 generate_mk.py $(SEEDOPT_GEN)
|
||||
|
||||
makefile-./%: %/Makefile
|
||||
@$(MAKE) -C $*
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ BUILD_DIR ?= $(realpath $(ROOT_DIR)/../build)
|
|||
SRC_DIR := $(realpath $(ROOT_DIR)/..)
|
||||
|
||||
SBY ?= sby
|
||||
YOSYS ?= $(BUILD_DIR)/yosys
|
||||
ABC ?= $(BUILD_DIR)/yosys-abc
|
||||
YOSYS_FILTERLIB ?= $(BUILD_DIR)/yosys-filterlib
|
||||
YOSYS_CONFIG ?= $(BUILD_DIR)/yosys-config
|
||||
YOSYS_SMTBMC ?= $(BUILD_DIR)/yosys-smtbmc
|
||||
YOSYS ?= $(BUILD_DIR)/$(PROGRAM_PREFIX)yosys
|
||||
ABC ?= $(BUILD_DIR)/$(PROGRAM_PREFIX)yosys-abc
|
||||
YOSYS_FILTERLIB ?= $(BUILD_DIR)/$(PROGRAM_PREFIX)yosys-filterlib
|
||||
YOSYS_CONFIG ?= $(BUILD_DIR)/$(PROGRAM_PREFIX)yosys-config
|
||||
YOSYS_SMTBMC ?= $(BUILD_DIR)/$(PROGRAM_PREFIX)yosys-smtbmc
|
||||
YOSYS_MAX_THREADS ?= 4
|
||||
COVERAGE_DIR ?= $(realpath $(ROOT_DIR)/..)/coverage
|
||||
COVERAGE_HTML ?= $(realpath $(ROOT_DIR)/..)/coverage_html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue