diff --git a/kotlin-native/klib/src/test/kotlin/org/jetbrains/kotlin/cli/klib/test/ZipTest.kt b/compiler/util-io/test/org/jetbrains/kotlin/cli/klib/ZipTest.kt similarity index 87% rename from kotlin-native/klib/src/test/kotlin/org/jetbrains/kotlin/cli/klib/test/ZipTest.kt rename to compiler/util-io/test/org/jetbrains/kotlin/cli/klib/ZipTest.kt index d95aab0e0c0..db4be705793 100644 --- a/kotlin-native/klib/src/test/kotlin/org/jetbrains/kotlin/cli/klib/test/ZipTest.kt +++ b/compiler/util-io/test/org/jetbrains/kotlin/cli/klib/ZipTest.kt @@ -1,15 +1,13 @@ /* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.cli.klib.test +package org.jetbrains.kotlin.cli.klib import org.jetbrains.kotlin.konan.file.File import org.jetbrains.kotlin.konan.file.unzipTo import org.jetbrains.kotlin.konan.file.use -import org.jetbrains.kotlin.library.impl.javaFile -import org.junit.After import org.junit.Before import org.junit.Rule import org.junit.Test @@ -64,7 +62,7 @@ class ZipTest { } private fun createMaliciousArchive(file: File) { - ZipOutputStream(FileOutputStream(file.javaFile())).use { + ZipOutputStream(FileOutputStream(java.io.File(file.path))).use { it.putNextEntry(ZipEntry("../definitelySafe.txt")) it.closeEntry() } diff --git a/kotlin-native/klib/build.gradle b/kotlin-native/klib/build.gradle index cd397a3839b..991659e7d08 100644 --- a/kotlin-native/klib/build.gradle +++ b/kotlin-native/klib/build.gradle @@ -23,11 +23,4 @@ dependencies { implementation project(":kotlin-stdlib") implementation project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements') implementation project(":kotlin-native:utilities:basic-utils") - testImplementation libs.junit4 - testImplementation RepoDependencies.kotlinTest(project, "junit") -} - -test { - dependsOn 'cleanTest' - // Specify a path to the distribution that is used in the tests. }