From f5e1a72bb481e605b97fa916d4b2f49479115bba Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Wed, 29 Apr 2020 19:57:55 -0400 Subject: [PATCH 1/6] Remove CoreCLR TargetSpecific test build jobs Refactor targetSpecific test build Remove targetSpecific build-test-jobs.yml jobs Build targetSpecific tests in run-test-job.yml jobs --- .../templates/runtimes/run-test-job.yml | 42 ++++++++++++++----- eng/pipelines/coreclr/ci.yml | 17 -------- eng/pipelines/runtime.yml | 40 ------------------ 3 files changed, 31 insertions(+), 68 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index d52240be644def..2804c2adca008d 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -58,10 +58,11 @@ jobs: dependsOn: - ${{ if ne(parameters.corefxTests, true) }}: - - ${{ if eq(parameters.testGroup, 'innerloop') }}: - - '${{ parameters.runtimeFlavor }}_common_test_build_p0_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' - - ${{ if ne(parameters.testGroup, 'innerloop') }}: - - '${{ parameters.runtimeFlavor }}_common_test_build_p1_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' + - ${{ if ne(parameters.testBuildPhased, true) }}: + - ${{ if eq(parameters.testGroup, 'innerloop') }}: + - '${{ parameters.runtimeFlavor }}_common_test_build_p0_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' + - ${{ if ne(parameters.testGroup, 'innerloop') }}: + - '${{ parameters.runtimeFlavor }}_common_test_build_p1_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_${{ parameters.archType }}_${{parameters.buildConfig }}' - ${{ if eq(parameters.testBuildPhased, true) }}: # Also depend on AnyOS AnyCPU tests - ${{ if eq(parameters.testGroup, 'innerloop') }}: @@ -209,13 +210,14 @@ jobs: artifactName: '$(managedGenericTestArtifactName)' displayName: 'generic managed test artifacts' - # Download and unzip target specific tests - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: '$(managedTestArtifactRootFolderPath)' - artifactFileName: '$(managedTestArtifactName)$(archiveExtension)' - artifactName: '$(managedTestArtifactName)' - displayName: 'managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})' + # Download and unzip target specific tests (unless we build them below) + - ${{ if ne(parameters.testBuildPhased, true) }}: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: '$(managedTestArtifactRootFolderPath)' + artifactFileName: '$(managedTestArtifactName)$(archiveExtension)' + artifactName: '$(managedTestArtifactName)' + displayName: 'managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})' # Download product binaries directory @@ -236,6 +238,24 @@ jobs: artifactName: '$(coreClrProductArtifactName)' displayName: 'CoreCLR product download for Mono' + + # Build target specific tests + - ${{ if ne(parameters.corefxTests, true) }}: + - ${{ if eq(parameters.testBuildPhased, true) }}: + # Install test build dependencies + - ${{ if eq(parameters.osGroup, 'OSX') }}: + - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) + displayName: Install native dependencies + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + # Necessary to install correct cmake version + - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force + displayName: Install native dependencies + + # Build targetSpecific managed test components + - script: $(coreClrRepoRootDir)build-test$(scriptExt) targetSpecific skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) + displayName: Build managed test components + + # Download and unzip the Microsoft.NET.Sdk.IL package needed for traversing # ilproj test projects during copynativeonly. - ${{ if ne(parameters.corefxTests, true) }}: diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 51a85c2f4558df..4028d51a5e222a 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -103,23 +103,6 @@ jobs: liveLibrariesBuildConfig: Release testBuildPhase: targetGeneric -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: checked - platforms: - - Linux_arm - - Linux_arm64 - - OSX_x64 - - Windows_NT_arm - - Windows_NT_arm64 - - Windows_NT_x64 - - Windows_NT_x86 - testGroup: outerloop - jobParameters: - liveLibrariesBuildConfig: Release - testBuildPhase: targetSpecific - # # Checked JIT test runs # diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index da37549ddfd373..af93039f2173f7 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -592,46 +592,6 @@ jobs: eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true)) -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: checked - platforms: - - Linux_arm - - Windows_NT_x86 - - Windows_NT_arm - - Windows_NT_arm64 - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - testBuildPhase: targetSpecific - condition: >- - or( - eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) - -# -# CoreCLR Test builds using live libraries debug build -# Only when CoreCLR is changed -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: checked - platforms: - - OSX_x64 - - Linux_x64 - - Linux_arm64 - - Windows_NT_x64 - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - testBuildPhase: targetSpecific - condition: >- - or( - eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) - # # CoreCLR Test executions using live libraries # Only when CoreCLR is changed From fe28ce54510b85c44db430d49dbfa50be1e716de Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Thu, 30 Apr 2020 19:39:27 -0400 Subject: [PATCH 2/6] Fix Microsoft.NET.Sdk.IL package download --- .../common/templates/runtimes/run-test-job.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 2804c2adca008d..61e248beb00d55 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -256,15 +256,17 @@ jobs: displayName: Build managed test components + # If we didn't build target specific tests here # Download and unzip the Microsoft.NET.Sdk.IL package needed for traversing # ilproj test projects during copynativeonly. - ${{ if ne(parameters.corefxTests, true) }}: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: '$(microsoftNetSdkIlFolderPath)' - artifactFileName: '$(microsoftNetSdkIlArtifactName)$(archiveExtension)' - artifactName: '$(microsoftNetSdkIlArtifactName)' - displayName: 'Microsoft.NET.Sdk.IL package' + - ${{ if ne(parameters.testBuildPhased, true) }}: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: '$(microsoftNetSdkIlFolderPath)' + artifactFileName: '$(microsoftNetSdkIlArtifactName)$(archiveExtension)' + artifactName: '$(microsoftNetSdkIlArtifactName)' + displayName: 'Microsoft.NET.Sdk.IL package' # Download and unzip native test artifacts From 5b8218a83d9a01a653f22d41f215ea4c31e33a97 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Thu, 30 Apr 2020 21:06:21 -0400 Subject: [PATCH 3/6] Adjust display names --- eng/pipelines/common/templates/runtimes/run-test-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 61e248beb00d55..0f3e82b2388837 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -217,7 +217,7 @@ jobs: unpackFolder: '$(managedTestArtifactRootFolderPath)' artifactFileName: '$(managedTestArtifactName)$(archiveExtension)' artifactName: '$(managedTestArtifactName)' - displayName: 'managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})' + displayName: 'target specific managed test artifacts (built on ${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }})' # Download product binaries directory @@ -253,7 +253,7 @@ jobs: # Build targetSpecific managed test components - script: $(coreClrRepoRootDir)build-test$(scriptExt) targetSpecific skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) - displayName: Build managed test components + displayName: Build target specific managed test components # If we didn't build target specific tests here From 4b0403999db3c5e0c79b89152fb480d72df871ea Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 1 May 2020 15:24:50 -0400 Subject: [PATCH 4/6] Make 5 tests target specific These tests are failing in PR runs when built on OSX and run on specific platforms --- .../readytorun/coreroot_determinism/coreroot_determinism.csproj | 1 + .../tests/src/readytorun/crossgen2/crossgen2smoke.csproj | 1 + .../src/readytorun/determinism/crossgen2determinism.csproj | 1 + src/coreclr/tests/src/readytorun/tests/mainv1.csproj | 2 ++ src/coreclr/tests/src/readytorun/tests/mainv2.csproj | 2 ++ 5 files changed, 7 insertions(+) diff --git a/src/coreclr/tests/src/readytorun/coreroot_determinism/coreroot_determinism.csproj b/src/coreclr/tests/src/readytorun/coreroot_determinism/coreroot_determinism.csproj index 3fbc7d2691fd51..541698b29206c5 100644 --- a/src/coreclr/tests/src/readytorun/coreroot_determinism/coreroot_determinism.csproj +++ b/src/coreclr/tests/src/readytorun/coreroot_determinism/coreroot_determinism.csproj @@ -5,6 +5,7 @@ 0 true + 1 true diff --git a/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj b/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj index e97fc45f15cdfd..ae16127cb33b50 100644 --- a/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj +++ b/src/coreclr/tests/src/readytorun/crossgen2/crossgen2smoke.csproj @@ -7,6 +7,7 @@ true + 1 .ildll diff --git a/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj b/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj index 52d6c1ba8357d8..558d3b8e7058d4 100644 --- a/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj +++ b/src/coreclr/tests/src/readytorun/determinism/crossgen2determinism.csproj @@ -5,6 +5,7 @@ 0 true + 1 true diff --git a/src/coreclr/tests/src/readytorun/tests/mainv1.csproj b/src/coreclr/tests/src/readytorun/tests/mainv1.csproj index 8587289faf1054..91d1da34ed91f6 100644 --- a/src/coreclr/tests/src/readytorun/tests/mainv1.csproj +++ b/src/coreclr/tests/src/readytorun/tests/mainv1.csproj @@ -3,6 +3,8 @@ exe BuildAndRun false + + 1 diff --git a/src/coreclr/tests/src/readytorun/tests/mainv2.csproj b/src/coreclr/tests/src/readytorun/tests/mainv2.csproj index 9207507d02e13b..25a6b98afcc38f 100644 --- a/src/coreclr/tests/src/readytorun/tests/mainv2.csproj +++ b/src/coreclr/tests/src/readytorun/tests/mainv2.csproj @@ -3,6 +3,8 @@ exe BuildAndRun false + + 1 From 0b77968058743787196a077bdc96d1746a29248a Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 1 May 2020 15:27:53 -0400 Subject: [PATCH 5/6] Feedback --- .../templates/runtimes/run-test-job.yml | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 0f3e82b2388837..42cb3758d4db30 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -240,33 +240,31 @@ jobs: # Build target specific tests - - ${{ if ne(parameters.corefxTests, true) }}: - - ${{ if eq(parameters.testBuildPhased, true) }}: - # Install test build dependencies - - ${{ if eq(parameters.osGroup, 'OSX') }}: - - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) - displayName: Install native dependencies - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - # Necessary to install correct cmake version - - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force - displayName: Install native dependencies + - ${{ if and(ne(parameters.corefxTests, true), eq(parameters.testBuildPhased, true)) }}: + # Install test build dependencies + - ${{ if eq(parameters.osGroup, 'OSX') }}: + - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) + displayName: Install native dependencies + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + # Necessary to install correct cmake version + - script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force + displayName: Install native dependencies - # Build targetSpecific managed test components - - script: $(coreClrRepoRootDir)build-test$(scriptExt) targetSpecific skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) - displayName: Build target specific managed test components + # Build targetSpecific managed test components + - script: $(coreClrRepoRootDir)build-test$(scriptExt) targetSpecific skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) + displayName: Build target specific managed test components # If we didn't build target specific tests here # Download and unzip the Microsoft.NET.Sdk.IL package needed for traversing # ilproj test projects during copynativeonly. - - ${{ if ne(parameters.corefxTests, true) }}: - - ${{ if ne(parameters.testBuildPhased, true) }}: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - unpackFolder: '$(microsoftNetSdkIlFolderPath)' - artifactFileName: '$(microsoftNetSdkIlArtifactName)$(archiveExtension)' - artifactName: '$(microsoftNetSdkIlArtifactName)' - displayName: 'Microsoft.NET.Sdk.IL package' + - ${{ if and(ne(parameters.corefxTests, true), ne(parameters.testBuildPhased, true)) }}: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + unpackFolder: '$(microsoftNetSdkIlFolderPath)' + artifactFileName: '$(microsoftNetSdkIlArtifactName)$(archiveExtension)' + artifactName: '$(microsoftNetSdkIlArtifactName)' + displayName: 'Microsoft.NET.Sdk.IL package' # Download and unzip native test artifacts From a1e394a0fc6f4fabdd1293207a0b20597f51dba9 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 1 May 2020 20:43:22 -0400 Subject: [PATCH 6/6] Fix disable of 5 tests --- src/coreclr/tests/src/readytorun/tests/fieldgetter.ilproj | 2 ++ src/coreclr/tests/src/readytorun/tests/testv1/test.csproj | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/coreclr/tests/src/readytorun/tests/fieldgetter.ilproj b/src/coreclr/tests/src/readytorun/tests/fieldgetter.ilproj index 45d63e135ee202..3a93b6c81d08af 100644 --- a/src/coreclr/tests/src/readytorun/tests/fieldgetter.ilproj +++ b/src/coreclr/tests/src/readytorun/tests/fieldgetter.ilproj @@ -2,6 +2,8 @@ Library SharedLibrary + + 1 diff --git a/src/coreclr/tests/src/readytorun/tests/testv1/test.csproj b/src/coreclr/tests/src/readytorun/tests/testv1/test.csproj index 970a6904e4f11b..783ed6a1e94c0f 100644 --- a/src/coreclr/tests/src/readytorun/tests/testv1/test.csproj +++ b/src/coreclr/tests/src/readytorun/tests/testv1/test.csproj @@ -2,6 +2,8 @@ library SharedLibrary + + 1