@@ -77,6 +77,62 @@ steps:
77
77
$Package = Get-ChildItem -Recurse -Filter "CascadiaPackage_*.msix"
78
78
.\build\scripts\Test-WindowsTerminalPackage.ps1 -Verbose -Path $Package.FullName
79
79
80
+ - task: powershell@2
81
+ displayName: 'Source Index PDBs'
82
+ condition: ne(variables['PGOBuildMode'], 'Instrument')
83
+ inputs:
84
+ targetType: filePath
85
+ filePath: build\scripts\Index-Pdbs.ps1
86
+ arguments: -SearchDir '$(Build.SourcesDirectory)' -SourceRoot '$(Build.SourcesDirectory)' -recursive -Verbose -CommitId $(Build.SourceVersion)
87
+ errorActionPreference: silentlyContinue
88
+
89
+ - task: PowerShell@2
90
+ displayName: 'Rationalize build platform'
91
+ inputs:
92
+ targetType: inline
93
+ script: |
94
+ $Arch = "$(BuildPlatform)"
95
+ If ($Arch -Eq "x86") { $Arch = "Win32" }
96
+ Write-Host "##vso[task.setvariable variable=RationalizedBuildPlatform]${Arch}"
97
+
98
+ - task: PowerShell@2
99
+ displayName: 'Run Unit Tests'
100
+ inputs:
101
+ targetType: filePath
102
+ filePath: build\scripts\Run-Tests.ps1
103
+ arguments: -MatchPattern '*unit.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}'
104
+ condition: and(and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument')), or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86')))
105
+
106
+ - task: PowerShell@2
107
+ displayName: 'Run Feature Tests (x64 only)'
108
+ inputs:
109
+ targetType: filePath
110
+ filePath: build\scripts\Run-Tests.ps1
111
+ arguments: -MatchPattern '*feature.test*.dll' -Platform '$(RationalizedBuildPlatform)' -Configuration '$(BuildConfiguration)' -LogPath '${{ parameters.testLogPath }}'
112
+ condition: and(and(succeeded(), ne(variables['PGOBuildMode'], 'Instrument')), eq(variables['BuildPlatform'], 'x64'))
113
+
114
+ - task: PowerShell@2
115
+ displayName: 'Convert Test Logs from WTL to xUnit format'
116
+ inputs:
117
+ targetType: filePath
118
+ filePath: build\Helix\ConvertWttLogToXUnit.ps1
119
+ arguments: -WttInputPath '${{ parameters.testLogPath }}' -WttSingleRerunInputPath 'unused.wtl' -WttMultipleRerunInputPath 'unused2.wtl' -XUnitOutputPath 'onBuildMachineResults.xml' -TestNamePrefix '$(BuildConfiguration).$(BuildPlatform)'
120
+ condition: and(ne(variables['PGOBuildMode'], 'Instrument'),or(eq(variables['BuildPlatform'], 'x64'), eq(variables['BuildPlatform'], 'x86')))
121
+
122
+ - task: PublishTestResults@2
123
+ displayName: 'Upload converted test logs'
124
+ condition: ne(variables['PGOBuildMode'], 'Instrument')
125
+ inputs:
126
+ testResultsFormat: 'xUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
127
+ testResultsFiles: '**/onBuildMachineResults.xml'
128
+ #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
129
+ #mergeTestResults: false # Optional
130
+ #failTaskOnFailedTests: false # Optional
131
+ testRunTitle: 'On Build Machine Tests' # Optional
132
+ buildPlatform: $(BuildPlatform) # Optional
133
+ buildConfiguration: $(BuildConfiguration) # Optional
134
+ #publishRunAttachments: true # Optional
135
+
80
136
- task: CopyFiles@2
81
137
displayName: 'Copy result logs to Artifacts'
82
138
inputs:
@@ -105,9 +161,9 @@ steps:
105
161
displayName: 'Copy outputs needed for test runs to Artifacts'
106
162
inputs:
107
163
Contents: |
108
- $(Build.SourcesDirectory)/bin/$(BuildPlatform )/$(BuildConfiguration)/*.exe
109
- $(Build.SourcesDirectory)/bin/$(BuildPlatform )/$(BuildConfiguration)/*.dll
110
- $(Build.SourcesDirectory)/bin/$(BuildPlatform )/$(BuildConfiguration)/*.xml
164
+ $(Build.SourcesDirectory)/bin/$(RationalizedBuildPlatform )/$(BuildConfiguration)/*.exe
165
+ $(Build.SourcesDirectory)/bin/$(RationalizedBuildPlatform )/$(BuildConfiguration)/*.dll
166
+ $(Build.SourcesDirectory)/bin/$(RationalizedBuildPlatform )/$(BuildConfiguration)/*.xml
111
167
**/Microsoft.VCLibs.*.appx
112
168
**/TestHostApp/*
113
169
TargetFolder: '$(Build.ArtifactStagingDirectory)/$(BuildConfiguration)/$(BuildPlatform)/test'
0 commit comments