diff --git a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml index d236f3cc3..775a9c890 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml @@ -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: | diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index fc3c0fcc4..59ea2758a 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -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"