Fix legacyjit CI testing
authorRoman Artemev <rartemev@microsoft.com>
Mon, 12 Jun 2017 23:42:50 +0000 (16:42 -0700)
committerRoman Artemev <rartemev@microsoft.com>
Tue, 27 Jun 2017 18:16:35 +0000 (11:16 -0700)
netci.groovy
tests/legacyjit_x86_testenv.cmd [new file with mode: 0644]

index e9202bb..979d023 100755 (executable)
@@ -143,7 +143,7 @@ class Constants {
     def static configurationList = ['Debug', 'Checked', 'Release']
 
     // This is the set of architectures
-    def static architectureList = ['arm', 'arm64', 'x64', 'x86']
+    def static architectureList = ['arm', 'arm64', 'x64', 'x86', 'x86lb']
 }
 
 def static setMachineAffinity(def job, def os, def architecture, def options = null) {
@@ -363,6 +363,7 @@ def static getJobName(def configuration, def architecture, def os, def scenario,
             }
             break
         case 'x86':
+        case 'x86lb':
             baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
             break
         default:
@@ -381,6 +382,7 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
             switch (architecture) {
                 case 'x64':
                 case 'x86':
+                case 'x86lb':
                     if (architecture == 'x86' && os == 'Ubuntu') {
                         Utilities.addPeriodicTrigger(job, '@daily')
                     }
@@ -439,7 +441,7 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
                     }
                 }
                 // For x86, only add per-commit jobs for Windows
-                else if (architecture == 'x86') {
+                else if (architecture == 'x86' || architecture == 'x86lb') {
                     if (os == 'Windows_NT') {
                         Utilities.addGithubPushTrigger(job)
                     }
@@ -1345,6 +1347,26 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
                     break
             }
             break
+         // editor brace matching: }
+        case 'x86lb': // editor brace matching: {
+            assert (os == 'Windows_NT')
+            assert (scenario == 'default' || Constants.r2rJitStressScenarios.indexOf(scenario) !=1)
+
+            def arch = 'x86'
+            def jit = 'legacy_backend'
+            switch (scenario) {
+                case 'default':
+                    if (configuration == 'Checked') {
+                        Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test",
+                            "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}.*")
+                    }
+                    break
+                default:
+                    println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
+                    assert false
+                    break
+            }
+            break
         // editor brace matching: }
         default:
             println("Unknown architecture: ${architecture}");
@@ -1364,8 +1386,12 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
             switch (architecture) {
                 case 'x64':
                 case 'x86':
+                case 'x86lb':
                     def arch = architecture
                     def buildOpts = ''
+                    if (architecture == 'x86lb') {
+                        arch = 'x86'
+                    }
 
                     if (scenario == 'illink') {
                         buildCommands += "tests\\scripts\\build_illink.cmd clone ${arch}"
@@ -1523,6 +1549,9 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                         else if (architecture == 'x64' || architecture == 'x86') {
                             buildCommands += "tests\\runtest.cmd ${runtestArguments}"
                         }
+                        else if (architecture == 'x86lb') {
+                            buildCommands += "tests\\runtest.cmd ${runtestArguments} TestEnv %WORKSPACE%\\tests\\legacyjit_x86_testenv.cmd"
+                        }
                     }
 
                     if (!enableCorefxTesting) {
@@ -1826,6 +1855,11 @@ combinedScenarios.each { scenario ->
                                 return
                             }
                             break
+                        case 'x86lb':
+                            if (os != 'Windows_NT') {
+                                return
+                            }
+                            break
                         case 'x64':
                             // Everything implemented
                             break
@@ -1866,6 +1900,10 @@ combinedScenarios.each { scenario ->
                                 }
                                 // Windows: Everything implemented
                                 break
+                            case 'x86lb':
+                                // No stress modes for legacy jit.
+                                // (There's no technical reason we couldn't allow these.)
+                                return                            
                             default:
                                 return
                         }
diff --git a/tests/legacyjit_x86_testenv.cmd b/tests/legacyjit_x86_testenv.cmd
new file mode 100644 (file)
index 0000000..053bd16
--- /dev/null
@@ -0,0 +1,11 @@
+@REM -------------------------------------------------------------------------
+@REM 
+@REM  This script provides x86 Legacy JIT test environment settings
+@REM
+@REM -------------------------------------------------------------------------
+
+set COMPLUS_AltJit=*
+set COMPLUS_AltJitNgen=*
+set COMPLUS_AltJitName=legacyjit.dll
+set COMPLUS_NoGuiOnAssert=1
+set COMPLUS_AltJitAssertOnNYI=1