Skip to content

Commit 4dfd95b

Browse files
committed
Produce binlog for test step
1 parent adddf78 commit 4dfd95b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

azure-pipelines-official.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,16 @@ extends:
138138
name: Build
139139
displayName: Build
140140

141+
# Both the Build and Test steps produces binlog named Build.binlog (https://github.com/dotnet/arcade/issues/15611)
142+
# We want to publish both binlogs.
143+
# So, as a hack, we build, rename, test, rename again.
144+
- task: PowerShell@2
145+
displayName: 'Rename Build.binlog to BuildStep.binlog'
146+
inputs:
147+
targetType: inline
148+
script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\BuildStep.binlog"
149+
150+
141151
- ${{ if eq(parameters.SkipTests, False) }}:
142152
# -ci is allowing to import some environment variables and some required configurations
143153
# -nobl avoids overwriting build binlog with binlog from tests
@@ -148,6 +158,12 @@ extends:
148158
name: Test
149159
displayName: Test
150160

161+
- task: PowerShell@2
162+
displayName: 'Rename Build.binlog to TestStep.binlog'
163+
inputs:
164+
targetType: inline
165+
script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog"
166+
151167
- task: CopyFiles@2
152168
displayName: 'Copy binlogs'
153169
inputs:

azure-pipelines.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ stages:
9393
name: Build
9494
displayName: Build
9595

96+
# Both the Build and Test steps produces binlog named Build.binlog (https://github.com/dotnet/arcade/issues/15611)
97+
# We want to publish both binlogs.
98+
# So, as a hack, we build, rename, test, rename again.
99+
- task: PowerShell@2
100+
displayName: 'Rename Build.binlog to BuildStep.binlog'
101+
inputs:
102+
targetType: inline
103+
script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\BuildStep.binlog"
104+
96105
- ${{ if eq(parameters.SkipTests, False) }}:
97106
# -ci is allowing to import some environment variables and some required configurations
98107
# -nobl avoids overwriting build binlog with binlog from tests
@@ -103,6 +112,12 @@ stages:
103112
name: Test
104113
displayName: Test
105114

115+
- task: PowerShell@2
116+
displayName: 'Rename Build.binlog to TestStep.binlog'
117+
inputs:
118+
targetType: inline
119+
script: Copy-Item -Path "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\Build.binlog" -Destination "$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\TestStep.binlog"
120+
106121
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
107122
# through the console or trx
108123
- task: PublishBuildArtifacts@1

0 commit comments

Comments
 (0)