| commit | b3de642c888cf4553d2ef71b1088d563ccec42a6 | [log] [tgz] |
|---|---|---|
| author | Rico Wind <ricow@google.com> | Fri Sep 22 09:54:54 2023 +0200 |
| committer | Rico Wind <ricow@google.com> | Fri Sep 22 08:22:12 2023 +0000 |
| tree | 880a38f3b8a7c1f050f12e0a2eb1e428d76c235f | |
| parent | 08da5e55020bf996f013cfbbf274346729cf4f26 [diff] |
Support running on machines that does not have >=3 cores Change-Id: I9147a4e092dda56f384dfcb6d0c902016339d6d5
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt b/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt index 46feea5..9a8c17f 100644 --- a/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt +++ b/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt
@@ -149,7 +149,7 @@ test.maxParallelForks = processors.div(userDefinedCoresPerFork.toInt()) } else { // On work machines this seems to give the best test execution time (without freezing). - test.maxParallelForks = processors.div(3) + test.maxParallelForks = maxOf(processors.div(3), 1) // On low cpu count machines (bots) we under subscribe, so increase the count. if (processors == 32) { test.maxParallelForks = 15