This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new bdaf8a1dc74 build: Exclude :solr:ui: (Kotlin multiplatform) tests on 
-x test (#3184)
bdaf8a1dc74 is described below

commit bdaf8a1dc7487dde384649eb730d6662983a1f4a
Author: Christos Malliaridis <[email protected]>
AuthorDate: Sat Feb 15 01:48:06 2025 +0200

    build: Exclude :solr:ui: (Kotlin multiplatform) tests on -x test (#3184)
    
    The Kotlin multiplatform tests are attached to Gradle "check" not "test", 
therefore they are not excluded on the CLI with `-x test`.
    
    This is a hack... hopefully can eventually improve.
---
 solr/ui/build.gradle.kts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/solr/ui/build.gradle.kts b/solr/ui/build.gradle.kts
index ef110a296a5..f7231822281 100644
--- a/solr/ui/build.gradle.kts
+++ b/solr/ui/build.gradle.kts
@@ -167,3 +167,20 @@ compose.desktop {
         }
     }
 }
+
+tasks.matching { task ->
+    task.name in listOf(
+        "allTests",
+        "desktopTest",
+        "wasmJsTest",
+        "wasmJsBrowserTest",
+    )
+}.configureEach {
+    // These kotlin multiplatform test tasks are not excluded on "gradlew ... 
-x test",
+    // so we disable them explicitly
+    onlyIf { !gradle.startParameter.excludedTaskNames.contains("test") }
+
+    // Note that "gradlew check -x test --dry-run" does not correctly resolve 
this exclusion rule,
+    // and you will see the test tasks being listed there as well, but they 
will be skipped as
+    // expected
+}

Reply via email to