From: Ben Soares Date: Wed, 26 Apr 2023 11:11:49 +0000 (+0100) Subject: JAL-4167 Adjustments to get clover to work with normal tests. Adjustment made on... X-Git-Tag: Release_2_11_3_0~14^2~94 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=e514117ba234e16efac9e4e956dd887aa28fc64e;p=jalview.git JAL-4167 Adjustments to get clover to work with normal tests. Adjustment made on build server (TestNG Parser: build/reports/tests/**/testng-results.xml --- 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