From d568a8dc19a0779067d974e66fde48a1b965c0b6 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 9 Feb 2024 10:45:33 -0800 Subject: [PATCH] kokoro: Avoid using Kokoro's env_vars setting It makes it hard to run ephemeral jobs, and we don't actually need it here because we aren't changing the setting with manual runs. --- buildscripts/kokoro/macos.cfg | 8 -------- buildscripts/kokoro/macos.sh | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/buildscripts/kokoro/macos.cfg b/buildscripts/kokoro/macos.cfg index f79634e3cf..a58691a710 100644 --- a/buildscripts/kokoro/macos.cfg +++ b/buildscripts/kokoro/macos.cfg @@ -4,14 +4,6 @@ build_file: "grpc-java/buildscripts/kokoro/macos.sh" timeout_mins: 45 -# We had problems with random tests timing out because it took seconds to do -# trivial (ns) operations. The Mac machines have 2 cores with 4 logical -# threads, so Gradle should be using 4 workers by default. -env_vars { - key: "GRADLE_FLAGS" - value: "--max-workers=2" -} - # We always build mvn artifacts. action { define_artifacts { diff --git a/buildscripts/kokoro/macos.sh b/buildscripts/kokoro/macos.sh index df52a004f5..97259231ee 100755 --- a/buildscripts/kokoro/macos.sh +++ b/buildscripts/kokoro/macos.sh @@ -7,6 +7,11 @@ fi readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)" +# We had problems with random tests timing out because it took seconds to do +# trivial (ns) operations. The Kokoro Mac machines have 2 cores with 4 logical +# threads, so Gradle should be using 4 workers by default. +export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2" + . "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh trap spongify_logs EXIT