Publish test-failure artifacts.
This commit is contained in:
parent
419e9af9c4
commit
533a2f448d
|
@ -62,6 +62,22 @@ steps:
|
|||
- ${{ if parameters.testIt }}:
|
||||
- bash: cargo test --all --target $TARGET --release $CARGO_FEATURES_FLAGS --features="$CARGO_FEATURES_EXPLICIT"
|
||||
displayName: cargo test
|
||||
- bash: |
|
||||
artifact_dir="$(Build.ArtifactStagingDirectory)/test_failures"
|
||||
mkdir -p "$artifact_dir"
|
||||
mv *.observed "$artifact_dir"
|
||||
mv *.expected "$artifact_dir"
|
||||
if [ -n "$(ls -A $artifact_dir)" ]; then
|
||||
echo "##vso[task.setvariable variable=TEST_FAILURE_ARTIFACTS;]true"
|
||||
fi
|
||||
displayName: Package test failure files
|
||||
condition: failed()
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: Publish packaged test failures
|
||||
condition: eq(variables['TEST_FAILURE_ARTIFACTS'], true)
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/test_failures'
|
||||
artifactName: test-failures-$(TARGET)
|
||||
|
||||
# For non-canary builds, export artifacts.
|
||||
|
||||
|
|
Loading…
Reference in New Issue