diff --git a/build-tools/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy b/build-tools/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy index 158b9520538..3dd05197131 100644 --- a/build-tools/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy +++ b/build-tools/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy @@ -491,8 +491,10 @@ fun runTest() { def files = compileList.stream() .map { it.path } .collect(Collectors.toList()) - runCompiler(files, klibPath, flags + ["-p", "library"]) - runCompiler([], executablePath(), flags + ["-Xinclude=$klibPath"]) + if (!files.empty) { + runCompiler(files, klibPath, flags + ["-p", "library"]) + runCompiler([], executablePath(), flags + ["-Xinclude=$klibPath"]) + } } else { // Regular compilation with modules. Map modules = compileList.stream()