From 0190ed14d9d3cb875c60672514b722d9e27f4a1f Mon Sep 17 00:00:00 2001 From: Matthew Crymble Date: Fri, 3 Jun 2022 13:55:30 -0500 Subject: tests: mark test jobs as an overall failure if there is a test failure using the continueOnError option for test run steps is a convenient way to allow all subsequent steps to run despite a test failure. But this causes the job status to be 'SucceededWithIssues' and not a full 'Failed' status. --- .ci/templates/job-uhd-hardware-tests.yml | 7 +++++++ .ci/templates/job-uhd-streaming-tests.yml | 6 ++++++ 2 files changed, 13 insertions(+) (limited to '.ci/templates') diff --git a/.ci/templates/job-uhd-hardware-tests.yml b/.ci/templates/job-uhd-hardware-tests.yml index c0c51288b..6f42cb8ef 100644 --- a/.ci/templates/job-uhd-hardware-tests.yml +++ b/.ci/templates/job-uhd-hardware-tests.yml @@ -97,3 +97,10 @@ jobs: mergeTestResults: true condition: and(succeeded(), eq('${{ parameters.runPyTest }}', true), eq(variables['deviceEnabled'], 'true')) displayName: Upload pytest results + + - script: | + echo "A previous step failed. See steps with warnings." + echo "Marking the overall build status as a failure." + exit 1 + condition: in(variables['Agent.JobStatus'], 'SucceededWithIssues') + displayName: Mark build as failure \ No newline at end of file diff --git a/.ci/templates/job-uhd-streaming-tests.yml b/.ci/templates/job-uhd-streaming-tests.yml index 24d47d59d..bcce368d5 100644 --- a/.ci/templates/job-uhd-streaming-tests.yml +++ b/.ci/templates/job-uhd-streaming-tests.yml @@ -212,4 +212,10 @@ jobs: mergeTestResults: true failTaskOnFailedTests: false displayName: Upload streaming test results + - script: | + echo "A previous step failed. See steps with warnings." + echo "Marking the overall build status as a failure." + exit 1 + condition: in(variables['Agent.JobStatus'], 'SucceededWithIssues') + displayName: Mark build as failure -- cgit v1.2.3