Skip to content

Commit 03d593b

Browse files
committed
ci: Add test job debug steps
This commit introduces new debug points `test-pre` and `test-post` that can be used to start a remote debug session before and after the Twister run, respectively. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 5b4b42b commit 03d593b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ on:
7979
- toolchain-pre
8080
- toolchain-post
8181
- hosttools
82+
- test-pre
83+
- test-post
8284

8385
concurrency:
8486
group: ${{ github.event_name == 'workflow_dispatch' && github.run_id || github.head_ref || github.ref }}
@@ -147,6 +149,8 @@ jobs:
147149
${{ contains(github.event.pull_request.labels.*.name, 'debug-toolchain-pre') }} && MATRIX_DEBUG="toolchain-pre"
148150
${{ contains(github.event.pull_request.labels.*.name, 'debug-toolchain-post') }} && MATRIX_DEBUG="toolchain-post"
149151
${{ contains(github.event.pull_request.labels.*.name, 'debug-hosttools') }} && MATRIX_DEBUG="hosttools"
152+
${{ contains(github.event.pull_request.labels.*.name, 'debug-test-pre') }} && MATRIX_DEBUG="test-pre"
153+
${{ contains(github.event.pull_request.labels.*.name, 'debug-test-post') }} && MATRIX_DEBUG="test-post"
150154
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
151155
# Set configurations based on the user selection
152156
case '${{ github.event.inputs.host }}' in
@@ -1608,6 +1612,12 @@ jobs:
16081612
# Install Python dependencies from the checked out Zephyr repository.
16091613
pip3 install -r ${ZEPHYR_ROOT}/scripts/requirements.txt
16101614
1615+
- name: Setup debug session (pre)
1616+
if: always() && needs.setup.outputs.debug == 'test-pre'
1617+
uses: mxschmitt/action-tmate@v3
1618+
with:
1619+
limit-access-to-actor: true
1620+
16111621
- name: Run test suites
16121622
run: |
16131623
# Activate Python virtual environment
@@ -1789,6 +1799,12 @@ jobs:
17891799
${TEST_ARGS} \
17901800
${PLATFORM_ARGS}
17911801
1802+
- name: Setup debug session (post)
1803+
if: always() && needs.setup.outputs.debug == 'test-post'
1804+
uses: mxschmitt/action-tmate@v3
1805+
with:
1806+
limit-access-to-actor: true
1807+
17921808
- name: Publish test results
17931809
if: always()
17941810
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)