From cf6b0eb1b2b96f039a01b93872e034b8ad929086 Mon Sep 17 00:00:00 2001 From: Jonathan Leitschuh Date: Mon, 14 Mar 2022 13:55:08 -0400 Subject: [PATCH 1/2] Log test events during test execution --- plugin/build.gradle.kts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 5b31631a..3c6f26dd 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -1,5 +1,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.util.prefixIfNot @@ -75,6 +77,21 @@ tasks.named("test").configure { tasks.withType().configureEach { useJUnitPlatform() maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 + doFirst { + logger.lifecycle("maxParallelForks for '$path' is $maxParallelForks") + } + testLogging { + events( + TestLogEvent.STARTED, + TestLogEvent.FAILED, + TestLogEvent.PASSED, + TestLogEvent.SKIPPED + ) + exceptionFormat = TestExceptionFormat.FULL + showExceptions = true + showCauses = true + showStackTraces = true + } } val relocateShadowJar = tasks.register("relocateShadowJar") From 3080595823e10f84c368137a32875c2ab174a169 Mon Sep 17 00:00:00 2001 From: Jonathan Leitschuh Date: Mon, 14 Mar 2022 13:56:39 -0400 Subject: [PATCH 2/2] Also grab the replay_pid log file on crash --- .github/workflows/build-and-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-check.yml b/.github/workflows/build-and-check.yml index ef0d581a..0387d411 100644 --- a/.github/workflows/build-and-check.yml +++ b/.github/workflows/build-and-check.yml @@ -66,7 +66,9 @@ jobs: name: memory-dump-${{ runner.os }} path: | hs_err_pid* + replay_pid* plugin/hs_err_pid* + plugin/replay_pid* - name: Check plugin codestyle run: ./plugin/gradlew -p ./plugin ktlintCheck --no-daemon