From e514117ba234e16efac9e4e956dd887aa28fc64e Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 26 Apr 2023 12:11:49 +0100 Subject: [PATCH] JAL-4167 Adjustments to get clover to work with normal tests. Adjustment made on build server (TestNG Parser: build/reports/tests/**/testng-results.xml --- build.gradle | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 2d2dad0..159da8d 100644 --- a/build.gradle +++ b/build.gradle @@ -1738,6 +1738,8 @@ compileTestJava.dependsOn compileJava ext.testsFailed = false /* testTask0 is the main test task */ task testTask0(type: Test) { + group = "Verification" + description = "The main test task. Runs all non-testTaskN-labelled tests (unless excluded)" useTestNG() { includeGroups testng_groups.split(",") excludeGroups testng_excluded_groups.split(",") @@ -1749,6 +1751,8 @@ task testTask0(type: Test) { /* separated tests */ task testTask1(type: Test) { + group = "Verification" + description = "Tests that need to be isolated from the main test run" useTestNG() { includeGroups name excludeGroups testng_excluded_groups.split(",") @@ -1775,7 +1779,7 @@ tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")}.all { te if (useClover) { dependsOn cloverClasses } else { //? - dependsOn compileJava //? + dependsOn testClasses //? } // run main tests first @@ -1873,6 +1877,8 @@ private static void printResults(allResults) { /* END of test tasks results summary */ task verifyTestStatus { + group = "Verification" + description = "Task that FAILs the build if any tests failed" doLast { if (testsFailed) { throw new GradleException("There were failing tests!") @@ -1883,10 +1889,9 @@ task verifyTestStatus { test { // from original test task if (useClover) { - //dependsOn.clear() dependsOn cloverClasses } else { //? - dependsOn compileJava //? + dependsOn testClasses } dependsOn tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")} finalizedBy verifyTestStatus -- 1.7.10.2