Windows CoreFX CI Staging Commit (#18388)
authorAndon Andonov <anandono@microsoft.com>
Thu, 21 Jun 2018 23:04:54 +0000 (16:04 -0700)
committerGitHub <noreply@github.com>
Thu, 21 Jun 2018 23:04:54 +0000 (16:04 -0700)
* Netci

* Add fake test switch

* Add branch PR trigger

* Add Checked corefx_innerloop jobs

netci.groovy
tests/runtest.cmd

index 47b3b6f..b50d3c1 100755 (executable)
@@ -151,7 +151,8 @@ class Constants {
                // 'jitdiff', // jitdiff is currently disabled, until someone spends the effort to make it fully work
                'standalone_gc',
                'gc_reliability_framework',
-               'illink']
+               'illink',
+               'corefx_innerloop']
 
     def static allScenarios = basicScenarios + r2rStressScenarios.keySet() + jitStressModeScenarios.keySet()
 
@@ -1741,6 +1742,11 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
                         case 'illink':
                             Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
                             break
+                        case 'corefx_innerloop':
+                            if (configuration == 'Release' || configuration == 'Checked') {
+                                Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} CoreFX Tests", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")                                
+                            }
+                            break
 
                         default:
                             if (isJitStressScenario(scenario)) {
@@ -2212,19 +2218,28 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                         runtestArguments = "${lowerConfiguration} ${arch} ${testOpts}"
 
                         if (doCoreFxTesting) {
-                            def workspaceRelativeFxRoot = "_/fx"
-                            def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
-                            def fxBranch = getFxBranch(branch)
+                            if (scenario == 'corefx_innerloop') {
+                                buildCommands += "tests\\runtest.cmd ${runtestArguments} CoreFXTests"
+                                
+                                // Archive and process (only) the test results
+                                Utilities.addArchival(newJob, "%WORKSPACE%bin/Logs/**/testResults.xml")
+                                Utilities.addXUnitDotNETResults(newJob, "%WORKSPACE%/bin/Logs/**/testResults.xml")
+                            }
+                            else {
+                              def workspaceRelativeFxRoot = "_/fx"
+                              def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
+                              def fxBranch = getFxBranch(branch)
 
-                            buildCommands += "python -u %WORKSPACE%\\tests\\scripts\\run-corefx-tests.py -arch ${arch} -ci_arch ${architecture} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${fxBranch} -env_script ${envScriptPath}"
+                              buildCommands += "python -u %WORKSPACE%\\tests\\scripts\\run-corefx-tests.py -arch ${arch} -ci_arch ${architecture} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${fxBranch} -env_script ${envScriptPath}"
 
-                            // Archive and process (only) the test results
-                            Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
-                            Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
+                              // Archive and process (only) the test results
+                              Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
+                              Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
 
-                            //Archive additional build stuff to diagnose why my attempt at fault injection isn't causing CI to fail
-                            Utilities.addArchival(newJob, "SetStressModes.bat", "", true, false)
-                            Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/testhost/**", "", true, false)
+                              //Archive additional build stuff to diagnose why my attempt at fault injection isn't causing CI to fail
+                              Utilities.addArchival(newJob, "SetStressModes.bat", "", true, false)
+                              Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/testhost/**", "", true, false)
+                            }
                         }
                         else if (isGcReliabilityFramework(scenario)) {
                             buildCommands += "tests\\runtest.cmd ${runtestArguments} GenerateLayoutOnly"
@@ -2571,6 +2586,12 @@ def static shouldGenerateJob(def scenario, def isPR, def architecture, def confi
         return false
     }
 
+    // Run basic corefx tests only on PR-triggered jobs
+    // Runs under Release and Checked 
+    if (scenario == 'corefx_innerloop' && !isPR) {
+        return false
+    }
+
     // Tizen is only supported for armem architecture
     if (os == 'Tizen' && architecture != 'armem') {
         return false
@@ -2784,6 +2805,14 @@ def static shouldGenerateJob(def scenario, def isPR, def architecture, def confi
                     return false
                 }
                 break
+            case 'corefx_innerloop':
+                if (os != 'Windows_NT'|| architecture != 'x64') {
+                    return false
+                }
+                if(configuration != 'Release' && configuration != 'Checked') {
+                    return false
+                }
+                break
             default:
                 println("Unknown scenario: ${scenario}")
                 assert false
@@ -2831,6 +2860,8 @@ Constants.allScenarios.each { scenario ->
 
                     // Create the new job
                     def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
+
+                    // Should we add corefx_innerloop to views?
                     addToViews(newJob, isPR, architecture, os)
 
                     setJobMachineAffinity(architecture, os, true, false, false, newJob) // isBuildJob = true, isTestJob = false, isFlowJob = false
@@ -3459,7 +3490,10 @@ def static shouldGenerateFlowJob(def scenario, def isPR, def architecture, def c
     if (scenario == 'innerloop' && !isPR) {
         return false
     }
-
+    
+    if (scenario == 'corefx_innerloop') {
+        return false
+    }
     // Filter based on OS and architecture.
 
     switch (architecture) {
index 072c273..89a5acd 100644 (file)
@@ -40,6 +40,7 @@ set __CollectDumps=
 set __DoCrossgen=
 set __CrossgenAltJit=
 set __PerfTests=
+set __CoreFXTests=
 
 :Arg_Loop
 if "%1" == "" goto ArgsDone
@@ -78,6 +79,7 @@ if /i "%1" == "jitdisasm"             (set __JitDisasm=1&shift&goto Arg_Loop)
 if /i "%1" == "ilasmroundtrip"        (set __IlasmRoundTrip=1&shift&goto Arg_Loop)
 if /i "%1" == "GenerateLayoutOnly"    (set __GenerateLayoutOnly=1&shift&goto Arg_Loop)
 if /i "%1" == "PerfTests"             (set __PerfTests=true&shift&goto Arg_Loop)
+if /i "%1" == "CoreFXTests"           (exit /b 0)
 if /i "%1" == "runcrossgentests"      (set RunCrossGen=true&shift&goto Arg_Loop)
 if /i "%1" == "link"                  (set DoLink=true&set ILLINK=%2&shift&shift&goto Arg_Loop)
 if /i "%1" == "tieredcompilation"     (set COMPLUS_TieredCompilation=1&shift&goto Arg_Loop)