Skip to content

Commit a1304c6

Browse files
committed
Move build integration tests out of :buildSrc project (#31961)
This way building buildSrc will not be delayed for all invocations, and will be less disruptive if integration tests fail
1 parent 94c1ebe commit a1304c6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

buildSrc/build.gradle

+16
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ if (project == rootProject) {
128128
}
129129
mavenCentral()
130130
}
131+
test {
132+
include "**/*Tests.class"
133+
exclude "**/*IT.class"
134+
}
131135
}
132136

133137
/*****************************************************************************
@@ -152,6 +156,18 @@ if (project != rootProject) {
152156
jarHell.enabled = false
153157
thirdPartyAudit.enabled = false
154158

159+
// tests can't be run with randomized test runner
160+
// it's fine as we run them as part of :buildSrc
161+
test.enabled = false
162+
task integTest(type: Test) {
163+
exclude "**/*Tests.class"
164+
include "**/*IT.class"
165+
testClassesDirs = sourceSets.test.output.classesDirs
166+
classpath = sourceSets.test.runtimeClasspath
167+
inputs.dir(file("src/testKit"))
168+
}
169+
check.dependsOn(integTest)
170+
155171
// TODO: re-enable once randomizedtesting gradle code is published and removed from here
156172
licenseHeaders.enabled = false
157173

0 commit comments

Comments
 (0)