Skip to content

Commit

Permalink
Defer more test configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Jan 24, 2023
1 parent 2353037 commit 5955883
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _ext/eclipse-wtp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sourceSets {
* All test classes need to run separately since they all instatiate different setups of the
* Eclipse framework.
*/
test {
tasks.withType(Test).configureEach {
//Skip default tests, which would run every test case.
exclude '**'
}
Expand Down
4 changes: 3 additions & 1 deletion _ext/gradle/java-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ dependencies {
testImplementation project(':testlib')
}

test { useJUnitPlatform() }
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
2 changes: 1 addition & 1 deletion gradle/special-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def special = [
]

boolean isCiServer = System.getenv().containsKey("CI")
tasks.named('test') {
tasks.withType(Test).configureEach {
// See com.diffplug.spotless.tag package for available JUnit 5 @Tag annotations
useJUnitPlatform {
excludeTags special as String[]
Expand Down
2 changes: 1 addition & 1 deletion lib-extra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
spotbugs { reportLevel = 'low' } // low|medium|high (low = sensitive to even minor mistakes)

apply from: rootProject.file('gradle/special-tests.gradle')
tasks.named('test') {
tasks.withType(Test).configureEach {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
// needed for EclipseCdtFormatterStepTest
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
Expand Down
2 changes: 1 addition & 1 deletion plugin-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
}

apply from: rootProject.file('gradle/special-tests.gradle')
tasks.named('test') {
tasks.withType(Test).configureEach {
testLogging.showStandardStreams = true
}

Expand Down
2 changes: 1 addition & 1 deletion testlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
spotbugs { reportLevel = 'high' } // low|medium|high (low = sensitive to even minor mistakes)

apply from: rootProject.file('gradle/special-tests.gradle')
tasks.named('test') {
tasks.withType(Test).configureEach {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
// for Antlr4FormatterStepTest and KtLintStepTest
def args = [
Expand Down

0 comments on commit 5955883

Please sign in to comment.