Skip to content

Commit dd15e32

Browse files
committed
Use .trx for test results
1 parent a3128fc commit dd15e32

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

azure-pipelines-PR.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ stages:
272272
- task: PublishTestResults@2
273273
displayName: Publish Test Results
274274
inputs:
275-
testResultsFormat: 'XUnit'
275+
testResultsFormat: 'VSTest'
276276
testRunTitle: WindowsNoRealsig_testCoreclr
277277
mergeTestResults: true
278-
testResultsFiles: '*.xml'
278+
testResultsFiles: '*.trx'
279279
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
280280
condition: succeededOrFailed()
281281

@@ -321,10 +321,10 @@ stages:
321321
- task: PublishTestResults@2
322322
displayName: Publish Test Results
323323
inputs:
324-
testResultsFormat: 'XUnit'
324+
testResultsFormat: 'VSTest'
325325
testRunTitle: WindowsNoRealsig_testDesktop batch $(System.JobPositionInPhase)
326326
mergeTestResults: true
327-
testResultsFiles: '*.xml'
327+
testResultsFiles: '*.trx'
328328
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
329329
condition: succeededOrFailed()
330330
continueOnError: true
@@ -475,10 +475,10 @@ stages:
475475
- task: PublishTestResults@2
476476
displayName: Publish Test Results
477477
inputs:
478-
testResultsFormat: 'XUnit'
478+
testResultsFormat: 'VSTest'
479479
testRunTitle: WindowsCompressedMetadata $(_testKind) $(transparentCompiler)
480480
mergeTestResults: true
481-
testResultsFiles: '*.xml'
481+
testResultsFiles: '*.trx'
482482
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)'
483483
continueOnError: true
484484
condition: succeededOrFailed() # ne(variables['_testKind'], 'testFSharpQA')
@@ -550,10 +550,10 @@ stages:
550550
- task: PublishTestResults@2
551551
displayName: Publish Test Results
552552
inputs:
553-
testResultsFormat: 'XUnit'
553+
testResultsFormat: 'VSTest'
554554
testRunTitle: WindowsCompressedMetadata testDesktop batch $(System.JobPositionInPhase)
555555
mergeTestResults: true
556-
testResultsFiles: '*.xml'
556+
testResultsFiles: '*.trx'
557557
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/Release'
558558
continueOnError: true
559559
condition: succeededOrFailed()
@@ -623,9 +623,9 @@ stages:
623623
- task: PublishTestResults@2
624624
displayName: Publish Test Results
625625
inputs:
626-
testResultsFormat: 'XUnit'
626+
testResultsFormat: 'VSTest'
627627
testRunTitle: Linux
628-
testResultsFiles: '*.xml'
628+
testResultsFiles: '*.trx'
629629
mergeTestResults: true
630630
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
631631
continueOnError: true
@@ -668,8 +668,8 @@ stages:
668668
- task: PublishTestResults@2
669669
displayName: Publish Test Results
670670
inputs:
671-
testResultsFormat: 'XUnit'
672-
testResultsFiles: '*.xml'
671+
testResultsFormat: 'VSTest'
672+
testResultsFiles: '*.trx'
673673
testRunTitle: MacOS
674674
mergeTestResults: true
675675
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ extends:
152152
- task: PublishTestResults@2
153153
displayName: Publish Test Results
154154
inputs:
155-
testResultsFormat: 'XUnit'
156-
testResultsFiles: '*.xml'
155+
testResultsFormat: 'VSTest'
156+
testResultsFiles: '*.trx'
157157
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
158158
continueOnError: true
159159
condition: ne(variables['SkipTests'], 'true')

eng/Build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
373373

374374
# {assembly} and {framework} will expand respectively. See https://github.com/spekt/testlogger/wiki/Logger-Configuration#logfilepath
375375
# This is useful to deconflict log filenames when there are many test assemblies, e.g. when testing a whole solution.
376-
$testLogPath = "$ArtifactsDir\TestResults\$configuration\{assembly}_{framework}$testBatchSuffix.xml"
376+
$testLogPath = "$ArtifactsDir\TestResults\$configuration\{assembly}_{framework}$testBatchSuffix.trx"
377377

378378
$testBinLogPath = "$LogDir\${projectName}_$targetFramework$testBatch.binlog"
379-
$args = "test $testProject -c $configuration -f $targetFramework --logger ""xunit;LogFilePath=$testLogPath"" --logger ""console;verbosity=normal"" /bl:$testBinLogPath"
379+
$args = "test $testProject -c $configuration -f $targetFramework --logger ""trx;LogFilePath=$testLogPath"" --logger ""console;verbosity=normal"" /bl:$testBinLogPath"
380380
$args += " --blame-hang-timeout 5minutes --results-directory $ArtifactsDir\TestResults\$configuration"
381381

382382
if (-not $noVisualStudio -or $norestore) {

eng/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ function Test() {
238238
if [[ "$testbatch" != "" ]]; then
239239
testbatchsuffix="_batch$testbatch"
240240
fi
241-
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework$testbatchsuffix.xml"
242-
args="test \"$testproject\" --no-build -c $configuration -f $targetframework --logger \"console;verbosity=normal\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration"
241+
testlogpath="$artifacts_dir/TestResults/$configuration/${projectname}_$targetframework$testbatchsuffix.trx"
242+
args="test \"$testproject\" --no-build -c $configuration -f $targetframework --logger \"trx;LogFileName=$testlogpath\" --logger \"console;verbosity=normal\" --blame-hang-timeout 5minutes --results-directory $artifacts_dir/TestResults/$configuration"
243243

244244
if [[ "$testbatch" != "" ]]; then
245245
args="$args --filter batch=$testbatch"

tests/FSharp.Build.UnitTests/MapSourceRootsTests.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ type MapSourceRootsTests() =
8282
Array.zip items mappings
8383
|> Array.iteri checkExpectations
8484

85+
[<Fact>]
86+
member _.``failing test for CI`` () =
87+
Assert.True(false, "This test is to verify that the test suite fails when expected. Remove it once confirmed.")
88+
8589
[<Fact>]
8690
member _.``basic deterministic scenarios`` () =
8791
let items =

0 commit comments

Comments
 (0)