From 1ef81c005eeb0c4b322f93e67540a535bbb8206a Mon Sep 17 00:00:00 2001 From: Igor Chevdar Date: Tue, 9 May 2023 20:39:14 +0300 Subject: [PATCH] [K/N][tests] Fixed a test for KT-55938 Used in the test cache directory should be prepared before the test --- kotlin-native/backend.native/tests/build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index a866ae98a80..dc1cc76cda2 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -5236,10 +5236,16 @@ if (PlatformInfo.isAppleTarget(project)) { "-Werror" // to forbid retry with auto-cache disabled ] + UtilsKt.findKonanBuildTask(project, "objc_kt55938", target).configure { + it.doFirst { + def cacheDir = new File("$testOutputRoot/local/interop_objc_kt55938/cache") + cacheDir.deleteDir() + mkdir(cacheDir) + } + } + doBeforeBuild { mkdir(buildDir) - def cacheDir = new File("-Xauto-cache-dir=$testOutputRoot/local/interop_objc_kt55938/cache") - cacheDir.deleteDir() project.extensions.execClang.execClangForCompilerTests(project.target) { args "$projectDir/interop/objc/kt55938/objclib.m" args "-lobjc", '-fobjc-arc'