Skip to content

Commit

Permalink
Fail test jobs on test failures (#4869)
Browse files Browse the repository at this point in the history
If the test job succeeds despite test failures there is no way to
retrigger them.

b/354062546
  • Loading branch information
oxve authored Feb 8, 2025
1 parent a6a1e8a commit affaaa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/actions/on_device_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ runs:
--gcs_result_path "${GCS_RESULTS_PATH}" || {
echo "Finished running tests..."
echo "The test session failed. See logs for details."
exit 0
# Fail the job so it's easy to retrigger.
exit 1
}
echo "Finished running tests..."
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/on_host_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ runs:
echo "Finished running tests..."
if [ -n "${failed_suites}" ]; then
echo "Test suites failed:${failed_suites}"
# Fail the job so it's easy to retrigger.
exit 1
fi
- name: Archive Test Results
if: success() || failure()
Expand Down

0 comments on commit affaaa6

Please sign in to comment.