From a3346c23a10d49ae28c6ef13ee7064f7762ab124 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 1 May 2020 12:53:37 -0400 Subject: [PATCH] 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 --- .../templates/runtimes/run-test-job.yml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 9e48a02d3e909..92d4eb1992441 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -212,12 +212,28 @@ jobs: # Download and unzip target specific tests - template: /eng/pipelines/common/download-artifact-step.yml parameters: - unpackFolder: '$(managedTestArtifactRootFolderPath)' - # We want the specific tests to overlay the generic tests - cleanUnpackFolder: false artifactFileName: '$(managedTestArtifactName)$(archiveExtension)' artifactName: '$(managedTestArtifactName)' displayName: 'managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})' + ${{ if ne(parameters.testBuildPhased, true) }}: + # These are the only tests unpack directly + unpackFolder: '$(managedTestArtifactRootFolderPath)' + ${{ if eq(parameters.testBuildPhased, true) }}: + # We want the specific tests to overlay the generic tests + # Unpacking directly casues issues due to not handling overwriting existing files + # Unpack to a temp folder and copy below + unpackFolder: '$(Build.SourcesDirectory)/__unpack__/$(managedTestArtifactName)' + + - ${{ if eq(parameters.testBuildPhased, true) }}: + # Copy target specific tests on top of the generic test + # Expected to overwrite duplicates + - task: CopyFiles@2 + displayName: Gather binaries for publish to artifacts + inputs: + SourceFolder: '$(Build.SourcesDirectory)/__unpack__/$(managedTestArtifactName)' + Contents: '**' + TargetFolder: '$(managedTestArtifactRootFolderPath)' + CleanTargetFolder: false # Download product binaries directory