aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Crymble <matthew.crymble@ni.com>2022-06-03 13:55:30 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2022-06-10 13:24:05 -0500
commit0190ed14d9d3cb875c60672514b722d9e27f4a1f (patch)
tree0f86b4a28e08ac952f50fe245cc846264e0dbb2f
parentN320: Revert PLL lock time reduction (diff)
downloaduhd-0190ed14d9d3cb875c60672514b722d9e27f4a1f.tar.xz
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.
-rw-r--r--.ci/templates/job-uhd-hardware-tests.yml7
-rw-r--r--.ci/templates/job-uhd-streaming-tests.yml6
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