diff --git a/.github/workflows/twister.yaml b/.github/workflows/twister.yaml index f85646f2704..668813b5c51 100644 --- a/.github/workflows/twister.yaml +++ b/.github/workflows/twister.yaml @@ -217,6 +217,14 @@ jobs: if: success() || failure() steps: + - name: Check out source code + if: needs.twister-build.result == 'failure' + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + persist-credentials: false + - name: Download Artifacts uses: actions/download-artifact@v4 with: @@ -244,23 +252,17 @@ jobs: files: "**/twister.xml" comment_mode: off - - name: Check out source code - if: failure() - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - name: Analyze Twister Reports - if: failure() + if: needs.twister-build.result == 'failure' run: | ./scripts/ci/twister_report_analyzer.py artifacts/*/*/twister.json --long-summary --platforms --output-md errors.md - echo '### Error Summary! 🚀' >> $GITHUB_STEP_SUMMARY - cat errors.md >> $GITHUB_STEP_SUMMARY + if [[ -s "errors.md" ]]; then + echo '### Error Summary! 🚀' >> $GITHUB_STEP_SUMMARY + cat errors.md >> $GITHUB_STEP_SUMMARY + fi - name: Upload Twister Analysis Results - if: failure() + if: needs.twister-build.result == 'failure' uses: actions/upload-artifact@v4 with: name: Twister Analysis Results diff --git a/tests/kernel/threads/thread_init/src/main.c b/tests/kernel/threads/thread_init/src/main.c index 2d03158fae1..c8e7c301278 100644 --- a/tests/kernel/threads/thread_init/src/main.c +++ b/tests/kernel/threads/thread_init/src/main.c @@ -153,7 +153,7 @@ ZTEST_USER(thread_init, test_kinit_preempt_thread) /*record time stamp of thread creation*/ t_create = k_uptime_get(); - zassert_not_null(pthread, "thread creation failed"); + zassert_is_null(pthread, "thread creation failed"); expected.init_p1 = INIT_PREEMPT_P1; expected.init_p2 = INIT_PREEMPT_P2;