9090 outputs :
9191 ahb-matrix : ${{ steps.gen.outputs.ahb_matrix }}
9292 axi-matrix : ${{ steps.gen.outputs.axi_matrix }}
93- axi-controller-matrix : ${{ steps.gen.outputs.axi_controller_matrix }}
93+ axi-controller-and-target-matrix : ${{ steps.gen.outputs.axi_controller_and_target_matrix }}
94+ axi-controller-only-matrix : ${{ steps.gen.outputs.axi_controller_only_matrix }}
9495 steps :
9596 - name : Checkout repository
9697 uses : actions/checkout@v4
@@ -143,7 +144,7 @@ jobs:
143144
144145 ahb_tests = set()
145146 axi_tests = set()
146- axi_controller_tests = set()
147+ controller_tests = set()
147148
148149 for session in sessions:
149150 tags = session.get("tags", [])
@@ -153,35 +154,38 @@ jobs:
153154 continue
154155
155156 name = session["name"]
156- has_ahb = "ahb" in tags
157- has_axi = "axi" in tags
158- has_axi_controller = "axi-controller" in tags # Or "axi_controller" if your nox tags use underscores
159-
157+
160158 if name in SPLIT_TESTS:
161159 session_id = session["session"]
162160 else:
163161 session_id = name
164162
165163 # Categorize tests by bus configuration
166- if has_ahb :
164+ if "ahb" in tags :
167165 ahb_tests.add(session_id)
168- if has_axi :
166+ if "axi" in tags :
169167 axi_tests.add(session_id)
170- if has_axi_controller:
171- axi_controller_tests.add(session_id)
168+
169+ # Any test tagged for a controller runs in both controller jobs
170+ if "controller" in tags or "axi-controller" in tags or "axi_controller" in tags:
171+ controller_tests.add(session_id)
172172
173173 # Sort for consistent ordering
174174 ahb_tests = sorted(ahb_tests)
175175 axi_tests = sorted(axi_tests)
176- axi_controller_tests = sorted(axi_controller_tests )
176+ controller_tests = sorted(controller_tests )
177177
178- print(f"Discovered {len(ahb_tests)} AHB tests, {len(axi_tests)} AXI tests, and {len(axi_controller_tests)} AXI-Controller tests")
178+ print(f"Discovered {len(ahb_tests)} AHB tests")
179+ print(f"Discovered {len(axi_tests)} AXI tests")
180+ print(f"Discovered {len(controller_tests)} Controller tests (running in both configurations)")
179181
180182 # Output matrices for subsequent jobs
183+ # Note: We output the same exact list (controller_tests) to both matrix variables
181184 with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
182185 f.write(f"ahb_matrix={json.dumps(ahb_tests)}\n")
183186 f.write(f"axi_matrix={json.dumps(axi_tests)}\n")
184- f.write(f"axi_controller_matrix={json.dumps(axi_controller_tests)}\n")
187+ f.write(f"axi_controller_and_target_matrix={json.dumps(controller_tests)}\n")
188+ f.write(f"axi_controller_only_matrix={json.dumps(controller_tests)}\n")
185189 EOF
186190
187191 lint-testplans :
@@ -368,10 +372,10 @@ jobs:
368372 verification/cocotb/**/*.log
369373
370374 # ===========================================================================
371- # Job: Run AXI-Controller Tests (Parallel)
375+ # Job: Run AXI-Controller and Target Tests (Parallel)
372376 # ===========================================================================
373377 tests-axi-controller-and-target :
374- name : " AXI-Ctrl: ${{ matrix.test }}"
378+ name : " AXI-Ctrl+Target : ${{ matrix.test }}"
375379 needs : [generate-matrix, lint-testplans]
376380 runs-on : ubuntu-latest
377381 strategy :
@@ -450,16 +454,16 @@ jobs:
450454 if : always()
451455 uses : actions/upload-artifact@v4
452456 with :
453- name : test-results-axi-controller-${{ steps.sanitize.outputs.name }}
457+ name : test-results-axi-controller-and-target- ${{ steps.sanitize.outputs.name }}
454458 path : |
455459 verification/cocotb/**/*.xml
456460 verification/cocotb/**/*.log
457461
458462 # ===========================================================================
459- # Job: Run AXI-Controller Tests (Parallel)
463+ # Job: Run AXI-Controller Only Tests (Parallel)
460464 # ===========================================================================
461465 tests-axi-controller-only :
462- name : " AXI-Ctrl: ${{ matrix.test }}"
466+ name : " AXI-Ctrl Only : ${{ matrix.test }}"
463467 needs : [generate-matrix, lint-testplans]
464468 runs-on : ubuntu-latest
465469 strategy :
@@ -577,7 +581,7 @@ jobs:
577581 run : |
578582 if [ "${{ needs.tests-ahb.result }}" != "success" ] || \
579583 [ "${{ needs.tests-axi.result }}" != "success" ] || \
580- [ "${{ needs.tests-axi-controller-and-target.result }}" != "success" ]; then
584+ [ "${{ needs.tests-axi-controller-and-target.result }}" != "success" ] || \
581585 [ "${{ needs.tests-axi-controller-only.result }}" != "success" ]; then
582586 echo "❌ Some tests failed!"
583587 echo " AHB tests: ${{ needs.tests-ahb.result }}"
0 commit comments