File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
dd-smoke-tests/gradle/src/test/groovy/datadog/smoketest Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -256,9 +256,20 @@ class GradleDaemonSmokeTest extends AbstractGradleTest {
256
256
.forwardOutput()
257
257
258
258
println " ${ new Date()} : $specificationContext . currentIteration . displayName - Starting Gradle run"
259
- def buildResult = successExpected ? gradleRunner. build() : gradleRunner. buildAndFail()
260
- println " ${ new Date()} : $specificationContext . currentIteration . displayName - Finished Gradle run"
261
- buildResult
259
+ try {
260
+ def buildResult = successExpected ? gradleRunner. build() : gradleRunner. buildAndFail()
261
+ println " ${ new Date()} : $specificationContext . currentIteration . displayName - Finished Gradle run"
262
+ return buildResult
263
+
264
+ } catch (Exception e) {
265
+ def daemonLog = Files . list(testKitFolder. resolve(" test-kit-daemon/" + gradleVersion)). filter(p -> p. toString(). endsWith(" log" )). findAny(). orElse(null )
266
+ if (daemonLog != null ) {
267
+ println " =============================================================="
268
+ println " ${ new Date()} : $specificationContext . currentIteration . displayName - Gradle Daemon log:\n ${ new String(Files.readAllBytes(daemonLog))} "
269
+ println " =============================================================="
270
+ }
271
+ throw e
272
+ }
262
273
}
263
274
264
275
private void assertBuildSuccessful (buildResult ) {
You can’t perform that action at this time.
0 commit comments