Skip to content

Commit 64c28e2

Browse files
committed
Don't run Gradle when no tests were found
1 parent ba14b2a commit 64c28e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/org/jetbrains/kotlin/test/helper/services/TestDataRunnerService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class TestDataRunnerService(
4747
smartReadAction(project) {
4848
val testDeclarations = filterAndCollectTestDescriptions(files, project)
4949
.filter { !it.psi.isHeavyTest() }
50+
.ifEmpty { return@smartReadAction null }
5051

5152
val filtered = if (!filterByClass.isNullOrEmpty()) {
5253
groupTests(testDeclarations)[filterByClass] ?: testDeclarations
@@ -57,7 +58,7 @@ class TestDataRunnerService(
5758
computeGradleCommandLine(filtered)
5859
}
5960
}
60-
}
61+
} ?: return
6162

6263
val config = GradleRunConfig(
6364
commandLine,

0 commit comments

Comments
 (0)