Enable server GC for Ubuntu test runs for PRs in CI
authorWilliam Godbe <william.godbe@comcast.net>
Thu, 14 Jan 2016 22:53:08 +0000 (14:53 -0800)
committerWilliam Godbe <william.godbe@comcast.net>
Thu, 14 Jan 2016 22:53:08 +0000 (14:53 -0800)
netci.groovy
tests/runtest.sh

index cb4e781..ffecf48 100644 (file)
@@ -485,6 +485,11 @@ def static addTriggers(def job, def isPR, def architecture, def os, def configur
                         Utilities.getFullJobName(project, getBuildJobName(configuration, architecture, os, scenario), isPR)
                     def inputWindowTestsBuildName = Utilities.getFolderName(project) + '/' + 
                         Utilities.getFullJobName(project, getBuildJobName(configuration, architecture, 'windows_nt', scenario), isPR)
+                    // Enable Server GC for Ubuntu PR builds
+                    def serverGCString = ""
+                    if (os == 'Ubuntu' && isPR){
+                        serverGCString = "--useServerGC"
+                    }
 
                     def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
                         // Add parameters for the inputs
@@ -546,7 +551,8 @@ def static addTriggers(def job, def isPR, def architecture, def os, def configur
             --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
             --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
             --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release\" \\
-            --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\"""")
+            --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\" \\
+            \${serverGCString}""")
                         }
                     }
                 
index 29db96b..1321ad4 100755 (executable)
@@ -39,6 +39,7 @@ function print_usage {
     echo '  --sequential                 : Run tests sequentially (default is to run in parallel).'
     echo '  -v, --verbose                : Show output from each test.'
     echo '  -h|--help                    : Show usage information.'
+    echo '  --useServerGC                : Enable server GC for this test run'
     echo ''
 }
 
@@ -578,6 +579,7 @@ mscorlibDir=
 coreFxBinDir=
 coreFxNativeBinDir=
 ((disableEventLogging = 0))
+((serverGC = 0))
 
 # Handle arguments
 verbose=0
@@ -627,6 +629,9 @@ do
         --sequential)
             ((maxProcesses = 1))
             ;;
+        --useServerGC)
+            ((serverGC = 1))
+            ;;
         *)
             echo "Unknown switch: $i"
             print_usage
@@ -639,6 +644,8 @@ if (( disableEventLogging == 0)); then
         export COMPlus_EnableEventLog=1
 fi
 
+export CORECLR_SERVER_GC="$serverGC"
+
 if [ -z "$testRootDir" ]; then
     echo "--testRootDir is required."
     print_usage
@@ -688,4 +695,4 @@ if ((countFailedTests > 0)); then
     exit $EXIT_CODE_TEST_FAILURE
 fi
 
-exit $EXIT_CODE_SUCCESS
+exit $EXIT_CODE_SUCCESS
\ No newline at end of file