Browse Source

Run the build integ test in parallel (#39788)

* Run the build integ test in parallel

Because the randomized runner lives in buildSrc, we run these tests with
the Gradle runner, and had no parallelism configured so far.

* Handle Windows and "auto" better
Alpar Torok 6 years ago
parent
commit
e48fe8b33d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      buildSrc/build.gradle

+ 5 - 0
buildSrc/build.gradle

@@ -232,6 +232,11 @@ if (project != rootProject) {
     if (isLuceneSnapshot) {
       systemProperty 'test.lucene-snapshot-revision', isLuceneSnapshot[0][1]
     }
+    String defaultParallel = System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel)
+    if (defaultParallel == "auto") {
+        defaultParallel = Math.max(Runtime.getRuntime().availableProcessors(), 4)
+    }
+    maxParallelForks defaultParallel as Integer
   }
   check.dependsOn(integTest)