git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-4167 Allow a test to run in multiple testTasks
[jalview.git]
/
build.gradle
diff --git
a/build.gradle
b/build.gradle
index
ac150fa
..
c23ba06
100644
(file)
--- 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) {
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(",")
useTestNG() {
includeGroups testng_groups.split(",")
excludeGroups testng_excluded_groups.split(",")
@@
-1749,10
+1751,11
@@
task testTask0(type: Test) {
/* separated tests */
task testTask1(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(",")
useTestNG() {
includeGroups name
excludeGroups testng_excluded_groups.split(",")
- tasks.withType(Test).matching {it.name.startsWith("testTask") && it.name != name}.all {t -> excludeGroups t.name}
preserveOrder true
useDefaultListeners=true
}
preserveOrder true
useDefaultListeners=true
}
@@
-1775,7
+1778,7
@@
tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")}.all { te
if (useClover) {
dependsOn cloverClasses
} else { //?
if (useClover) {
dependsOn cloverClasses
} else { //?
- dependsOn compileJava //?
+ dependsOn testClasses //?
}
// run main tests first
}
// run main tests first
@@
-1873,6
+1876,8
@@
private static void printResults(allResults) {
/* END of test tasks results summary */
task verifyTestStatus {
/* 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!")
doLast {
if (testsFailed) {
throw new GradleException("There were failing tests!")
@@
-1883,10
+1888,9
@@
task verifyTestStatus {
test {
// from original test task
if (useClover) {
test {
// from original test task
if (useClover) {
- dependsOn.clear()
dependsOn cloverClasses
} else { //?
dependsOn cloverClasses
} else { //?
- dependsOn compileJava //?
+ dependsOn testClasses
}
dependsOn tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")}
finalizedBy verifyTestStatus
}
dependsOn tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")}
finalizedBy verifyTestStatus