-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
fixedSomething works now, yay!Something works now, yay!infrastructureRelated to repository automationRelated to repository automationtestRelated to test codeRelated to test code
Description
When tests fail, the error messages displayed in Azure Pipelines can be truncated if the command lines and/or error messages are very long (>4000 characters). Apparently, this is a limitation that can't be lifted or directly worked around. However, we should be able to upload the test logs as artifacts. run-tests.yml might be the file to modify:
STL/azure-devops/run-tests.yml
Lines 1 to 48 in bbd5dba
| # Copyright (c) Microsoft Corporation. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| parameters: | |
| - name: buildOutputLocationVar | |
| type: string | |
| default: buildOutputLocation | |
| - name: targetPlatform | |
| type: string | |
| - name: hostArch | |
| type: string | |
| - name: targetArch | |
| type: string | |
| - name: displayName | |
| type: string | |
| default: 'Run Tests' | |
| - name: publishArtifact | |
| type: boolean | |
| default: false | |
| steps: | |
| - task: CmdLine@2 | |
| displayName: ${{ parameters.displayName }} | |
| timeoutInMinutes: 120 | |
| condition: succeeded() | |
| inputs: | |
| workingDirectory: $(${{ parameters.buildOutputLocationVar }}) | |
| script: | | |
| call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^ | |
| -host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo | |
| ctest -V | |
| env: { TMP: $(tmpDir), TEMP: $(tmpDir) } | |
| - task: PublishTestResults@2 | |
| displayName: 'Publish Tests' | |
| timeoutInMinutes: 10 | |
| condition: succeededOrFailed() | |
| inputs: | |
| searchFolder: $(${{ parameters.buildOutputLocationVar }}) | |
| testResultsFormat: JUnit | |
| testResultsFiles: '**/test-results.xml' | |
| testRunTitle: 'test-${{ parameters.targetPlatform }}-$(System.JobPositionInPhase)' | |
| - publish: $(${{ parameters.buildOutPutLocationVar }})/out | |
| artifact: '${{ parameters.targetPlatform }}-$(System.JobPositionInPhase)-libs-$(System.JobId)' | |
| condition: ${{ parameters.publishArtifact }} | |
| displayName: 'Publish Libs and Headers Artifact' | |
| - publish: $(${{ parameters.buildOutPutLocationVar }})/tests | |
| artifact: '${{ parameters.targetPlatform }}-$(System.JobPositionInPhase)-tests-$(System.JobId)' | |
| condition: ${{ parameters.publishArtifact }} | |
| displayName: 'Publish Tests Artifact' |
I think these are the log files:
STL/azure-devops/native-build-test.yml
Line 20 in bbd5dba
| xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml' |
STL/azure-devops/cross-build.yml
Line 23 in bbd5dba
| xmlOutputFlag: '--xunit-xml-output=$(${{ parameters.buildOutputLocationVar }})/test-results.xml' |
Metadata
Metadata
Assignees
Labels
fixedSomething works now, yay!Something works now, yay!infrastructureRelated to repository automationRelated to repository automationtestRelated to test codeRelated to test code