Merge pull request #18955 from dotnet-maestro-bot/release/2.1-UpdateDependencies
[platform/upstream/coreclr.git] / netci.groovy
index 120efb6..865c580 100755 (executable)
@@ -331,7 +331,6 @@ class Constants {
                'gcstress0xc'
     ]
 
-    // Note: no GCStress-related scenario is enabled currently.
     def static validLinuxArmScenarios = [
                'innerloop',
                'normal',
@@ -348,7 +347,7 @@ class Constants {
                'r2r_jitstressregs0x1000',
                'r2r_jitminopts',
                'r2r_jitforcerelocs',
-               // 'r2r_gcstress15',
+               'r2r_gcstress15',
                'minopts',
                'forcerelocs',
                'jitstress1',
@@ -369,17 +368,17 @@ class Constants {
                'jitstress2_jitstressregs0x10',
                'jitstress2_jitstressregs0x80',
                'jitstress2_jitstressregs0x1000',
-               'tailcallstress'
-               // 'gcstress0x3',
-               // 'gcstress0xc',
-               // 'zapdisable',
-               // 'heapverify1',
-               // 'gcstress0xc_zapdisable',
-               // 'gcstress0xc_zapdisable_jitstress2',
-               // 'gcstress0xc_zapdisable_heapverify1',
-               // 'gcstress0xc_jitstress1',
-               // 'gcstress0xc_jitstress2',
-               // 'gcstress0xc_minopts_heapverify1'
+               'tailcallstress',
+               'gcstress0x3',
+               'gcstress0xc',
+               'zapdisable',
+               'heapverify1',
+               'gcstress0xc_zapdisable',
+               'gcstress0xc_zapdisable_jitstress2',
+               'gcstress0xc_zapdisable_heapverify1',
+               'gcstress0xc_jitstress1',
+               'gcstress0xc_jitstress2',
+               'gcstress0xc_minopts_heapverify1'
     ]
 
     def static configurationList = ['Debug', 'Checked', 'Release']
@@ -969,10 +968,10 @@ def static getDockerImageName(def architecture, def os, def isBuild) {
         }
         else if (architecture == 'armem') {
             if (os == 'Ubuntu') {
-                return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20172211042239"
+                return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180405193556"
             }
             else if (os == 'Ubuntu16.04') {
-                return "microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-ef0ac75-20175511035548"
+                return "microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180404203310"
             }
             else if (os == 'Tizen') {
                 return "hqueue/dotnetcore:ubuntu1404_cross_prereqs_v4-tizen_rootfs"
@@ -980,7 +979,7 @@ def static getDockerImageName(def architecture, def os, def isBuild) {
         }
         else if (architecture == 'arm') {
             if (os == 'Ubuntu') {
-                return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180323032140"
+                return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180426002420"
             }
         }
     }
@@ -1084,6 +1083,12 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
         }
     }
 
+    if ((architecture == 'arm') && (os != 'Windows_NT') && isGCStressRelatedTesting(scenario)) {
+        // Non-Windows Arm GCStress jobs currently don't get cron or push triggers (until they are functional).
+        // See https://github.com/dotnet/coreclr/issues/17241.
+        return
+    }
+
     // Check scenario.
     switch (scenario) {
         case 'innerloop':
@@ -2392,9 +2397,9 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     // Ubuntu cross-compilation toolset (running on a Ubuntu x64 host).
 
                     def dockerImage = getDockerImageName(architecture, os, true)
-                    def dockerCmd = "docker run -i --rm -v \${WORKSPACE}:\${WORKSPACE} -w \${WORKSPACE} -e ROOTFS_DIR=/crossrootfs/arm ${dockerImage} "
+                    def dockerCmd = "docker run -i --rm -v \${WORKSPACE}:\${WORKSPACE} -w \${WORKSPACE} -e ROOTFS_DIR=/crossrootfs/arm -e CAC_ROOTFS_DIR=/crossrootfs/x86 ${dockerImage} "
 
-                    buildCommands += "${dockerCmd}\${WORKSPACE}/build.sh ${lowerConfiguration} ${architecture} cross"
+                    buildCommands += "${dockerCmd}\${WORKSPACE}/build.sh ${lowerConfiguration} ${architecture} cross crosscomponent"
 
                     // Then, using the same docker image, generate the CORE_ROOT layout using build-test.sh to
                     // download the appropriate CoreFX packages.
@@ -2414,6 +2419,17 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     buildCommands += "zip -r testnativebin.${lowerConfiguration}.zip ./bin/obj/Linux.arm.${configuration}/tests"
 
                     Utilities.addArchival(newJob, "coreroot.${lowerConfiguration}.zip,testnativebin.${lowerConfiguration}.zip", "")
+
+                    // We need to clean up the build machines; the docker build leaves newly built files with root permission, which
+                    // the cleanup task in Jenkins can't remove.
+                    newJob.with {
+                        publishers {
+                            azureVMAgentPostBuildAction {
+                                agentPostBuildAction('Delete agent after build execution (when idle).')
+                            }
+                        }
+                    }
+
                     break
                 default:
                     println("Unknown architecture: ${architecture}");
@@ -3151,20 +3167,17 @@ def static CreateOtherTestJob(def dslFactory, def project, def branch, def archi
                 testOpts += " --test-env=${scriptFileName}"
             }
 
-            // TODO: how to handle GCStress-related testing for Ubuntu/arm?
+            // setup-stress-dependencies.sh, invoked by runtest.sh to download the coredistools package, depends on the "dotnet"
+            // tool downloaded by the "init-tools.sh" script. However, it only invokes setup-stress-dependencies.sh for x64. The
+            // coredistools package is used by GCStress on x86 and x64 to disassemble code to determine instruction boundaries.
+            // On arm/arm64, it is not required as determining instruction boundaries is trivial.
             if (isGCStressRelatedTesting(scenario)) {
-                shell('./init-tools.sh')
+                if (architecture == 'x64') {
+                    shell('./init-tools.sh')
+                }
             }
 
-            def runScript = ""
-            if (isUbuntuArmJob) {
-                // Use 'runtesttilstable.sh' to rerun failing tests (in sequential mode);
-                // there are many tests that pass on rerun (currently), and we don't want
-                // that flakiness to affect overall test job robustness.
-                runScript = "${dockerCmd}./tests/runtesttilstable.sh"
-            } else {
-                runScript = "${dockerCmd}./tests/runtest.sh"
-            }
+            def runScript = "${dockerCmd}./tests/runtest.sh"
 
             shell("""\
 ${runScript} \\