From 7eec1b350f6ec8d1da406a3b47775ae03dd14132 Mon Sep 17 00:00:00 2001 From: Artem Daugel-Dauge Date: Fri, 23 Jun 2023 16:35:41 +0200 Subject: [PATCH] [Tests] Try to make CocoaPods installation more robus once againt --- .../jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt index 73ad6f3a6b2..f2c6a13357c 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/testbase/cocoapodsTestHelpers.kt @@ -166,6 +166,7 @@ fun cocoaPodsEnvironmentVariables(): Map { * * @throws AssertionError if [shouldInstallLocalCocoapods] is false and cocoapods has not been installed */ +@Synchronized fun ensureCocoapodsInstalled() { if (shouldInstallLocalCocoapods) { val installDir = cocoapodsInstallationRoot.absolutePathString() @@ -174,7 +175,7 @@ fun ensureCocoapodsInstalled() { try { //https://github.com/ffi/ffi/issues/864#issuecomment-875242776 gem("install", "--install-dir", installDir, "ffi", "-v", "1.15.5", "--", "--enable-libffi-alloc") - } catch (e: Exception) { + } catch (e: AssertionError) { System.err.println("ffi installation with '--enable-libffi-alloc' has failed but we'll try to continue with a default ffi") System.err.println(e.toString()) }