diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2022-06-03 13:55:30 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:05 -0500 |
commit | 0190ed14d9d3cb875c60672514b722d9e27f4a1f (patch) | |
tree | 0f86b4a28e08ac952f50fe245cc846264e0dbb2f /.ci/templates | |
parent | 6a8653d2c9a64b77335d0d941632f191815fab4e (diff) | |
download | uhd-0190ed14d9d3cb875c60672514b722d9e27f4a1f.tar.gz uhd-0190ed14d9d3cb875c60672514b722d9e27f4a1f.tar.bz2 uhd-0190ed14d9d3cb875c60672514b722d9e27f4a1f.zip |
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.
Diffstat (limited to '.ci/templates')
-rw-r--r-- | .ci/templates/job-uhd-hardware-tests.yml | 7 | ||||
-rw-r--r-- | .ci/templates/job-uhd-streaming-tests.yml | 6 |
2 files changed, 13 insertions, 0 deletions
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 |