From 03cd229784ef0510fa4611eace78d98cc2e8347c Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Mon, 23 Mar 2020 16:47:42 +0700 Subject: [PATCH] IDE perf tests for K/N: Drop redundant check for CommonLibraryKind --- .../kotlin/idea/perf/PerformanceNativeProjectsTest.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceNativeProjectsTest.kt b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceNativeProjectsTest.kt index 07fec7340eb..9ae3f482f8a 100644 --- a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceNativeProjectsTest.kt +++ b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceNativeProjectsTest.kt @@ -21,7 +21,6 @@ import org.jetbrains.kotlin.idea.caches.project.isMPPModule import org.jetbrains.kotlin.idea.configuration.klib.KotlinNativeLibraryNameUtil.parseIDELibraryName import org.jetbrains.kotlin.idea.configuration.readGradleProperty import org.jetbrains.kotlin.idea.facet.KotlinFacet -import org.jetbrains.kotlin.idea.framework.CommonLibraryKind import org.jetbrains.kotlin.idea.framework.detectLibraryKind import org.jetbrains.kotlin.idea.perf.PerformanceNativeProjectsTest.TestProject.* import org.jetbrains.kotlin.idea.perf.PerformanceNativeProjectsTest.TestTarget.* @@ -315,14 +314,7 @@ class PerformanceNativeProjectsTest : AbstractPerformanceProjectsTest() { .asSequence() .filterIsInstance() .mapNotNull { it.library } - .filter { library -> - val libraryKind = detectLibraryKind(library.getFiles(OrderRootType.CLASSES)) - libraryKind == NativeLibraryKind - // TODO: remove this check for CommonLibraryKind when detection of K/N KLIBs in - // org.jetbrains.kotlin.ide.konan.KotlinNativePluginUtilKt.isKonanLibraryRoot - // is correctly implemented - || libraryKind == CommonLibraryKind - } + .filter { detectLibraryKind(it.getFiles(OrderRootType.CLASSES)) == NativeLibraryKind } .mapNotNull inner@{ library -> val libraryNameParts = parseIDELibraryName(library.name.orEmpty()) ?: return@inner null val (_, pureLibraryName, platformPart) = libraryNameParts