Skip to content

Commit 5a12173

Browse files
committed
[#72831] Makefile: Introduced verification-docs-with-sim for docs with simulation results
Signed-off-by: Grzegorz Latosinski <[email protected]>
1 parent 573161f commit 5a12173

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

Makefile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ UVM_DIR ?= $(VERILATOR_UVM_DIR)/## Select UVM version
2828
SIMULATOR ?= verilator## Supported: verilator, dsim, questa, vcs
2929
REPO_URL ?= https://github.com/chipsalliance/i3c-core/tree/main/
3030

31+
# Path to directory with XMLs with tests' results
32+
TESTS_RESULTS_DIR ?= $(COCOTB_VERIF_DIR)
33+
# Base directory present in "file" entries in XMLs with cocotb results
34+
TESTS_XML_BASE_PATH ?= $(I3C_ROOT_DIR)
35+
3136
NUM_PROC := $$(($$(nproc)-1))
3237
# Environment variables
3338
export I3C_ROOT_DIR
@@ -134,12 +139,23 @@ tests-uvm-debug: config ## Run debugging I3C Core UVM tests with nox
134139
tests-tool: ## Run all tool tests
135140
cd $(TOOL_VERIF_DIR) && $(PYTHON) -m nox -k "verify" --no-venv
136141

137-
BLOCKS_VERIFICATION_PLANS = $(shell find $(TESTPLAN_DIR) -type f -name "*.hjson" ! -name "target*.hjson" -printf "%P\n")
138-
CORE_VERIFICATION_PLANS = $(shell find $(TESTPLAN_DIR) -type f -name "*target*.hjson" -printf "%P\n")
142+
BLOCKS_VERIFICATION_PLANS = $(shell find $(TESTPLAN_DIR) -type f -name "*.hjson" ! -name "target*.hjson" | sort)
143+
CORE_VERIFICATION_PLANS = $(shell find $(TESTPLAN_DIR) -type f -name "*target*.hjson" | sort)
139144
verification-docs:
140-
cd $(TESTPLAN_DIR) && testplanner $(BLOCKS_VERIFICATION_PLANS) -o $(TESTPLAN_DIR)/generated/testplans_blocks.md --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
141-
cd $(TESTPLAN_DIR) && testplanner $(CORE_VERIFICATION_PLANS) -o $(TESTPLAN_DIR)/generated/testplans_core.md --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
142-
145+
cd $(TESTPLAN_DIR) && testplanner $(BLOCKS_VERIFICATION_PLANS) -ot $(TESTPLAN_DIR)/generated/testplans_blocks.md --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
146+
cd $(TESTPLAN_DIR) && testplanner $(CORE_VERIFICATION_PLANS) -ot $(TESTPLAN_DIR)/generated/testplans_core.md --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
147+
148+
VERIFICATION_SIM_RESULTS_XMLS = $(shell find $(TESTS_RESULTS_DIR) -type f -name "*.xml" | sort)
149+
cocotbxml-to-hjson-sim-results:
150+
cocotbxml-to-hjson -i $(VERIFICATION_SIM_RESULTS_XMLS) -t $(BLOCKS_VERIFICATION_PLANS) -o $(TESTS_RESULTS_DIR) --tests-base-dir $(TESTS_XML_BASE_PATH) --tests-ignore-dirs venv .venv
151+
cocotbxml-to-hjson -i $(VERIFICATION_SIM_RESULTS_XMLS) -t $(CORE_VERIFICATION_PLANS) -o $(TESTS_RESULTS_DIR) --tests-base-dir $(TESTS_XML_BASE_PATH) --tests-ignore-dirs venv .venv
152+
153+
BLOCKS_VERIFICATION_SIM_RESULTS = $(shell find $(TESTS_RESULTS_DIR) -type f -name "*.hjson" ! -name "target*.hjson" | sort)
154+
CORE_VERIFICATION_SIM_RESULTS = $(shell find $(TESTS_RESULTS_DIR) -type f -name "*target*.hjson" | sort)
155+
verification-docs-with-sim: cocotbxml-to-hjson-sim-results
156+
testplanner $(BLOCKS_VERIFICATION_PLANS) -s $(BLOCKS_VERIFICATION_SIM_RESULTS) -ot $(TESTPLAN_DIR)/generated/testplans_blocks.md -os $(TESTPLAN_DIR)/generated/sim-results --output-summary-title "Tests for individual blocks" --output-summary $(TESTPLAN_DIR)/generated/sim-results/index-blocks.html --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
157+
testplanner $(CORE_VERIFICATION_PLANS) -s $(CORE_VERIFICATION_SIM_RESULTS) -ot $(TESTPLAN_DIR)/generated/testplans_core.md -os $(TESTPLAN_DIR)/sim-results --output-summary-title "Tests for the core" --output-summary $(TESTPLAN_DIR)/generated/sim-results/index-top.html --project-root $(I3C_ROOT_DIR) --testplan-file-map $(TESTPLAN_DIR)/source-maps.yml --source-url-prefix $(REPO_URL)
158+
cat $(TESTPLAN_DIR)/generated/sim-results/index-blocks.html $(TESTPLAN_DIR)/generated/sim-results/index-top.html > $(TESTPLAN_DIR)/generated/sim-results/index.html
143159
#
144160
# Utilities
145161
#

0 commit comments

Comments
 (0)