[Build] Fix gradle tests filter for JUnit 5

There is an a optimization in our `projectTest` config which filters
  out some compiled test classes if they didn't contain specified test
  (if user ran :test task with --tests flag). This optimization for one
  tests left only one .class file which contains test. But JUnit 5 for
  tests in inner classes (with @Nested annotation) requires not only
  target class, but and all it's containers

Test: package.SomeTest$Nested.testMethod
JUnit4: package/SomeTest$Nested.class
JUnit5:
- package/SomeTest.class
- package/SomeTest$Nested.class
This commit is contained in:
Dmitriy Novozhilov
2020-12-08 11:24:07 +03:00
parent e6b5cb5216
commit 8ddf419be5
2 changed files with 23 additions and 5 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
}
}
projectTest(parallel = true) {
projectTest(parallel = true, jUnit5Enabled = true) {
dependsOn(":dist")
workingDir = rootDir
jvmArgs!!.removeIf { it.contains("-Xmx") }