Add CI support for updated run-corefx-tests.py
authorBruce Forstall <brucefo@microsoft.com>
Fri, 19 Jan 2018 23:59:09 +0000 (15:59 -0800)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 19 Jan 2018 23:59:09 +0000 (15:59 -0800)
Change CI to build a "GenerateLayoutOnly" drop for corefx testing,
specifically to cause the corefx package to be restored, so we
can determine its version.

netci.groovy

index ad6f8bb..112495e 100755 (executable)
@@ -1650,7 +1650,12 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     }
 
                     if (enableCorefxTesting) {
-                        buildOpts += ' skiptests';
+                        // We shouldn't need to build the tests. However, run-corefx-tests.py currently depends on having the restored corefx
+                        // package available, to determine the correct corefx version git commit hash, and we need to build the tests before
+                        // running "tests\\runtest.cmd GenerateLayoutOnly". So build the pri-0 tests to make this happen.
+                        //
+                        // buildOpts += ' skiptests';
+                        buildOpts += " -priority=0"
                     } else {
                         buildOpts += " -priority=${priority}"
                     }
@@ -1748,6 +1753,10 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                         runtestArguments = "${lowerConfiguration} ${arch} ${testOpts}"
 
                         if (enableCorefxTesting) {
+                            // Generate the test layout because it restores the corefx package which allows run-corefx-tests.py
+                            // to determine the correct matching corefx version git commit hash.
+                            buildCommands += "tests\\runtest.cmd ${runtestArguments} GenerateLayoutOnly"
+
                             def workspaceRelativeFxRoot = "_/fx"
                             def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
 
@@ -1916,6 +1925,10 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                         // Build coreclr
                         buildCommands += "./build.sh verbose ${lowerConfiguration} ${architecture}"
 
+                        // Generate the test layout, which restores the corefx package, and allows run-corefx-tests.py to determine the
+                        // matching corefx version git commit hash.
+                        buildCommands += "./build-test.sh ${architecture} ${lowerConfiguration} generatelayoutonly"
+
                         def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
 
                         def envScriptCmds = envScriptCreate(os, scriptFileName)