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

jdaugherty pushed a commit to branch grails-geb
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit ebb2a22f970985e012f281eba27a51eb993e9cdb
Author: James Daugherty <[email protected]>
AuthorDate: Sun Apr 20 18:34:37 2025 -0400

    ensure all test tasks check test properties
---
 grails-test-suite-uber/build.gradle | 47 +++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/grails-test-suite-uber/build.gradle 
b/grails-test-suite-uber/build.gradle
index f1ea3c416d..bbf95521f5 100644
--- a/grails-test-suite-uber/build.gradle
+++ b/grails-test-suite-uber/build.gradle
@@ -85,6 +85,29 @@ def isolatedTestPatterns = [
 
 isolatedTestPatterns.keySet().each { taskName ->
     tasks.register(taskName, Test).configure { Test tTask ->
+        tTask.onlyIf {
+            if(project.hasProperty('onlyFunctionalTests')) {
+                return false
+            }
+
+            if (project.hasProperty('onlyMongodbTests')) {
+                return false
+            }
+
+            if (project.hasProperty('onlyHibernate5Tests')) {
+                return false
+            }
+
+            if(project.hasProperty('skipCoreTests')) {
+                return false
+            }
+
+            if(project.hasProperty('skipTests')) {
+                return false
+            }
+
+            true
+        }
         tTask.group = 'verification'
         tTask.filter.includePatterns = isolatedTestPatterns[taskName]
     }
@@ -123,6 +146,30 @@ tasks.withType(Test).configureEach {
 }
 
 tasks.named('test', Test).configure {
+    onlyIf {
+        if(project.hasProperty('onlyFunctionalTests')) {
+            return false
+        }
+
+        if (project.hasProperty('onlyMongodbTests')) {
+            return false
+        }
+
+        if (project.hasProperty('onlyHibernate5Tests')) {
+            return false
+        }
+
+        if(project.hasProperty('skipCoreTests')) {
+            return false
+        }
+
+        if(project.hasProperty('skipTests')) {
+            return false
+        }
+
+        true
+    }
+
     filter.excludePatterns = isolatedTestPatterns.values().flatten()
     dependsOn(provider {
         tasks.findAll({

Reply via email to