[Tizen] Add -pie to linker option
[platform/upstream/coreclr.git] / netci.groovy
index 620ceb8..865c580 100755 (executable)
@@ -210,11 +210,6 @@ class Constants {
                 'Checked'
             ]
         ],
-        'Tizen': [
-            'armem': [
-                'Checked'
-            ]
-        ],
     ]
 
     // A set of scenarios that are valid for arm/arm64/armlb tests run on hardware. This is a map from valid scenario name
@@ -336,7 +331,6 @@ class Constants {
                'gcstress0xc'
     ]
 
-    // Note: no GCStress-related scenario is enabled currently.
     def static validLinuxArmScenarios = [
                'innerloop',
                'normal',
@@ -353,7 +347,7 @@ class Constants {
                'r2r_jitstressregs0x1000',
                'r2r_jitminopts',
                'r2r_jitforcerelocs',
-               // 'r2r_gcstress15',
+               'r2r_gcstress15',
                'minopts',
                'forcerelocs',
                'jitstress1',
@@ -374,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']
@@ -974,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"
@@ -985,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"
             }
         }
     }
@@ -1089,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':
@@ -1399,13 +1399,12 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
         'BruceForstall',
         'CarolEidt',
         'cmckinsey',
+        'echesakovMSFT',
         'erozenfeld',
         'janvorli',
         'jashook',
         'JosephTremoulet',
         'pgodeq',
-        'pgavlin',
-        'rartemev',
         'russellhadley',
         'RussKeldorph',
         'sandreenko',
@@ -1687,21 +1686,15 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
                 case 'Ubuntu16.04':
                     assert scenario != 'innerloop'
                     Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
-                            "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
+                        "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
                     break
 
                 case 'Tizen':
                     architecture = 'armel'
 
-                    if (scenario == 'innerloop') {
-                        if (configuration == 'Checked') {
-                            Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build and Test")
-                        }
-                    }
-                    else {
-                        Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
-                            "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
-                    }
+                    assert scenario != 'innerloop'
+                    Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build",
+                        "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*")
                     break
             }
 
@@ -2404,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.
@@ -2426,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}");
@@ -3163,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} \\