Skip to content

Commit

Permalink
ci: Add test job debug steps
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stephanosio committed Oct 28, 2024
1 parent 3826767 commit aad6cc4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ on:
- toolchain-pre
- toolchain-post
- hosttools
- test-pre
- test-post

concurrency:
group: ${{ github.event_name == 'workflow_dispatch' && github.run_id || github.head_ref || github.ref }}
Expand Down Expand Up @@ -147,6 +149,8 @@ jobs:
${{ contains(github.event.pull_request.labels.*.name, 'debug-toolchain-pre') }} && MATRIX_DEBUG="toolchain-pre"
${{ contains(github.event.pull_request.labels.*.name, 'debug-toolchain-post') }} && MATRIX_DEBUG="toolchain-post"
${{ contains(github.event.pull_request.labels.*.name, 'debug-hosttools') }} && MATRIX_DEBUG="hosttools"
${{ contains(github.event.pull_request.labels.*.name, 'debug-test-pre') }} && MATRIX_DEBUG="test-pre"
${{ contains(github.event.pull_request.labels.*.name, 'debug-test-post') }} && MATRIX_DEBUG="test-post"
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
# Set configurations based on the user selection
case '${{ github.event.inputs.host }}' in
Expand Down Expand Up @@ -1608,6 +1612,12 @@ jobs:
# Install Python dependencies from the checked out Zephyr repository.
pip3 install -r ${ZEPHYR_ROOT}/scripts/requirements.txt
- name: Setup debug session (pre)
if: always() && needs.setup.outputs.debug == 'test-pre'
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

- name: Run test suites
run: |
# Activate Python virtual environment
Expand Down Expand Up @@ -1789,6 +1799,12 @@ jobs:
${TEST_ARGS} \
${PLATFORM_ARGS}
- name: Setup debug session (post)
if: always() && needs.setup.outputs.debug == 'test-post'
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

- name: Publish test results
if: always()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit aad6cc4

Please sign in to comment.