Skip to content

Commit

Permalink
Merge branch 'master' into hotfix/JLLeitschuhgh-562
Browse files Browse the repository at this point in the history
* master:
  Also grab the replay_pid log file on crash
  Log test events during test execution
  • Loading branch information
JLLeitschuh committed Mar 14, 2022
2 parents 331895e + 3080595 commit 2ecbce0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -75,6 +77,21 @@ tasks.named("test").configure {
tasks.withType<Test>().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<ConfigureShadowRelocation>("relocateShadowJar")
Expand Down

0 comments on commit 2ecbce0

Please sign in to comment.