diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/AbstractNativeKlibABITest.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/AbstractNativeKlibABITest.kt index de61955aaee..3bef2c69627 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/AbstractNativeKlibABITest.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/AbstractNativeKlibABITest.kt @@ -108,7 +108,7 @@ abstract class AbstractNativeKlibABITest : AbstractNativeSimpleTest() { dependencies.map { ExistingLibraryDependency(TestCompilationArtifact.KLIB(it), Library) } private val buildDir: File get() = testRunSettings.get().testBuildDir - private val stdlibFile: File get() = testRunSettings.get().dir.resolve("klib/common/stdlib") + private val stdlibFile: File get() = testRunSettings.get().stdlibFile companion object { private val COMPILER_ARGS_FOR_KLIB = TestCompilerArgs( diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt index 6ab039be98b..bf63feba5e6 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/NativeTestSupport.kt @@ -45,7 +45,7 @@ class NativeBlackBoxTestSupport : BeforeEachCallback { val settings = createTestRunSettings() // Set the essential compiler property. - System.setProperty("kotlin.native.home", settings.get().path) + System.setProperty("kotlin.native.home", settings.get().dir.path) // Inject the required properties to test instance. with(settings.get().enclosingTestInstance) { @@ -60,7 +60,7 @@ class NativeSimpleTestSupport : BeforeEachCallback { val settings = createSimpleTestRunSettings() // Set the essential compiler property. - System.setProperty("kotlin.native.home", settings.get().path) + System.setProperty("kotlin.native.home", settings.get().dir.path) // Inject the required properties to test instance. with(settings.get().enclosingTestInstance) { @@ -96,7 +96,7 @@ private object NativeTestSupport { } val nativeHome = computeNativeHome() - val hostManager = HostManager(distribution = Distribution(nativeHome.path), experimental = false) + val hostManager = HostManager(distribution = Distribution(nativeHome.dir.path), experimental = false) val nativeTargets = computeNativeTargets(hostManager) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/compilation/TestCompilation.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/compilation/TestCompilation.kt index e36d343a1b1..a480a5bd60d 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/compilation/TestCompilation.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/compilation/TestCompilation.kt @@ -157,7 +157,7 @@ internal abstract class SourceBasedCompilation( ) { override fun applySpecificArgs(argsBuilder: ArgsBuilder): Unit = with(argsBuilder) { add( - "-repo", home.dir.resolve("klib").path, + "-repo", home.librariesDir.path, "-output", expectedArtifact.path ) memoryModel.compilerFlags?.let { compilerFlags -> add(compilerFlags) } diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt index 003c8db2970..80db45acf80 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt @@ -104,7 +104,7 @@ internal class PredefinedTestCaseGroupProvider(annotation: PredefinedTestCases) private fun substituteRealPaths(value: String, settings: Settings): String = if ('$' in value) { // N.B. Here, more substitutions can be supported in the future if it would be necessary. - value.replace(PredefinedPaths.KOTLIN_NATIVE_DISTRIBUTION, settings.get().path) + value.replace(PredefinedPaths.KOTLIN_NATIVE_DISTRIBUTION, settings.get().dir.path) } else value } diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/settings/TestProcessSettings.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/settings/TestProcessSettings.kt index ea41db6a9a7..4b1a615891f 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/settings/TestProcessSettings.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/settings/TestProcessSettings.kt @@ -18,7 +18,8 @@ internal class KotlinNativeTargets(val testTarget: KonanTarget, val hostTarget: * The Kotlin/Native home. */ internal class KotlinNativeHome(val dir: File) { - val path: String get() = dir.path + val librariesDir: File = dir.resolve("klib") + val stdlibFile: File = librariesDir.resolve("common/stdlib") } /**