File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -86,18 +86,19 @@ tasks.withType<Test> {
8686}
8787
8888tasks.test {
89- // Excludes test suites from the default test task
90- // to avoid running some tests multiple times.
91- filter {
92- excludeTestsMatching(" *TestSuite" )
93- }
94- }
95-
96- task(" testTaieTestSuite" , type = Test ::class ) {
97- group = " verification"
98- description = " Runs the Tai-e test suite"
99- filter {
100- includeTestsMatching(" TaieTestSuite" )
89+ doFirst {
90+ // Exclude TestSuite classes when running all tests to prevent duplicate execution
91+ // Only apply this filter when no specific test patterns are specified via command line
92+ val testFilter = filter as ? org.gradle.api.internal.tasks.testing.filter.DefaultTestFilter
93+ val hasCommandLineIncludePatterns = testFilter
94+ ?.commandLineIncludePatterns
95+ ?.isNotEmpty()
96+ ? : false
97+ if (! hasCommandLineIncludePatterns) {
98+ filter {
99+ excludeTestsMatching(" *TestSuite" )
100+ }
101+ }
101102 }
102103}
103104
You can’t perform that action at this time.
0 commit comments