@@ -28,6 +28,11 @@ UVM_DIR ?= $(VERILATOR_UVM_DIR)/## Select UVM version
28
28
SIMULATOR ?= verilator# # Supported: verilator, dsim, questa, vcs
29
29
REPO_URL ?= https://github.com/chipsalliance/i3c-core/tree/main/
30
30
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
+
31
36
NUM_PROC := $$(($$(nproc ) -1 ) )
32
37
# Environment variables
33
38
export I3C_ROOT_DIR
@@ -134,12 +139,23 @@ tests-uvm-debug: config ## Run debugging I3C Core UVM tests with nox
134
139
tests-tool : # # Run all tool tests
135
140
cd $(TOOL_VERIF_DIR ) && $(PYTHON ) -m nox -k " verify" --no-venv
136
141
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 )
139
144
verification-docs :
140
- 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 )
141
- 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 )
142
-
145
+ 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
+ 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 .pyenv
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 .pyenv
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
143
159
#
144
160
# Utilities
145
161
#
0 commit comments