From eec183ef2840d0e3cc20af01f69cda1adea7383e Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 28 Mar 2019 13:47:33 +0100 Subject: [PATCH] Ensure spring-test test tasks are UP-TO-DATE Prior to this commit, the three `test` tasks in the spring-test module shared the same output directory for test reports. This had the negative side effect of causing Gradle to believe that the tasks were not UP-TO-DATE. Consequently, all three `test` tasks in the spring-test module were executed for every build even if there were zero changes in the spring-test module. This commit fixes this issue by allowing Gradle to use the default test results output directory for each `test` task. Thanks to @marcphilipp for providing the tip. In addition, the Artifactory Gradle task in the Default Job of the Bamboo build plan for the Spring Framework (SPR-PUB) has been updated to use the following custom test results directory pattern: `**/build/test-results/**/*.xml`. See: https://guides.gradle.org/using-build-cache/#concepts_overlapping_outputs --- spring-test/spring-test.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 186f1e1f93..394ae77bd2 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -95,7 +95,6 @@ task testNG(type: Test) { // Show STD_OUT & STD_ERR of the test JVM(s) on the console: // testLogging.showStandardStreams = true // forkEvery 1 - reports.junitXml.destination = file("$buildDir/test-results") } task testJUnitJupiter(type: Test) { @@ -107,7 +106,6 @@ task testJUnitJupiter(type: Test) { filter { includeTestsMatching "org.springframework.test.context.junit.jupiter.*" } - reports.junitXml.destination = file("$buildDir/test-results") // Java Util Logging for the JUnit Platform. // systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager") } @@ -119,7 +117,6 @@ test { scanForTestClasses = false include(["**/*Tests.class", "**/*Test.class"]) exclude(["**/testng/**/*.*", "**/jupiter/**/*.*"]) - reports.junitXml.destination = file("$buildDir/test-results") } task aggregateTestReports(type: TestReport) {