Add test result uploading (#3017)

* Add test result uploading

* Use -T

* Add displayName and buildConfiguration

* Add live testing result upload

* buildConfiguration -> testRunTitle

* Live tests 'Validate' -> 'ValidateLive' to differentiate job names in Test results output
This commit is contained in:
Daniel Jurek 2021-11-03 10:54:43 -07:00 committed by GitHub
parent b3bd976866
commit 52e0eeb393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 3 deletions

View File

@ -27,7 +27,7 @@ parameters:
# https://github.com/Azure/azure-sdk-for-cpp/issues/2944
jobs:
- job: Validate
- job: ValidateLive
condition: and(succeededOrFailed(), ne(variables['Skip.LiveTest'], 'true'))
timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}
strategy:
@ -198,10 +198,21 @@ jobs:
Location: ${{ parameters.Location }}
SubscriptionConfiguration: ${{ parameters.SubscriptionConfiguration }}
- script: ctest -C Debug -V --tests-regex ${{ parameters.CtestRegex }}
- script: ctest -C Debug --tests-regex ${{ parameters.CtestRegex }} --no-compress-output -T Test
workingDirectory: build
displayName: ctest
- task: PublishTestResults@2
inputs:
testResultsFormat: cTest
testResultsFiles: Testing/*/Test.xml
testRunTitle: $(Agent.JobName)
searchFolder: build
mergeTestResults: true
publishRunAttachments: true
displayName: Publish test results
condition: succeededOrFailed()
# Make coverage targets (specified in coverage_targets.txt) and assemble
# coverage report
- bash: |

View File

@ -109,9 +109,20 @@ jobs:
BuildArgs: "$(BuildArgs)"
Env: "$(CmakeEnvArg)"
- script: ctest -C Debug -V --tests-regex ${{ parameters.CtestRegex }}
- script: ctest -C Debug --tests-regex ${{ parameters.CtestRegex }} --no-compress-output -T Test
workingDirectory: build
- task: PublishTestResults@2
inputs:
testResultsFormat: cTest
testResultsFiles: Testing/*/Test.xml
testRunTitle: $(Agent.JobName)
searchFolder: build
mergeTestResults: true
publishRunAttachments: true
displayName: Publish test results
condition: succeededOrFailed()
- ${{ if eq(parameters.CoverageEnabled, true) }}:
- pwsh: |
$toolsDirectory = "$(Agent.TempDirectory)/coveragetools"