Skip to content

Commit a3346c2

Browse files
committed
Unzip target specific tests to a separate folder
Unzip target specific coreclr tests to a separate folder Copy to final destination w/o cleaning This fixes is intended to fix issues with unzip failing to overwrite duplicate files when unzipping the target specific tests
1 parent 07fde68 commit a3346c2

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

eng/pipelines/common/templates/runtimes/run-test-job.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,28 @@ jobs:
212212
# Download and unzip target specific tests
213213
- template: /eng/pipelines/common/download-artifact-step.yml
214214
parameters:
215-
unpackFolder: '$(managedTestArtifactRootFolderPath)'
216-
# We want the specific tests to overlay the generic tests
217-
cleanUnpackFolder: false
218215
artifactFileName: '$(managedTestArtifactName)$(archiveExtension)'
219216
artifactName: '$(managedTestArtifactName)'
220217
displayName: 'managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})'
218+
${{ if ne(parameters.testBuildPhased, true) }}:
219+
# These are the only tests unpack directly
220+
unpackFolder: '$(managedTestArtifactRootFolderPath)'
221+
${{ if eq(parameters.testBuildPhased, true) }}:
222+
# We want the specific tests to overlay the generic tests
223+
# Unpacking directly casues issues due to not handling overwriting existing files
224+
# Unpack to a temp folder and copy below
225+
unpackFolder: '$(Build.SourcesDirectory)/__unpack__/$(managedTestArtifactName)'
226+
227+
- ${{ if eq(parameters.testBuildPhased, true) }}:
228+
# Copy target specific tests on top of the generic test
229+
# Expected to overwrite duplicates
230+
- task: CopyFiles@2
231+
displayName: Gather binaries for publish to artifacts
232+
inputs:
233+
SourceFolder: '$(Build.SourcesDirectory)/__unpack__/$(managedTestArtifactName)'
234+
Contents: '**'
235+
TargetFolder: '$(managedTestArtifactRootFolderPath)'
236+
CleanTargetFolder: false
221237

222238

223239
# Download product binaries directory

0 commit comments

Comments
 (0)