-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move build integration tests out of :buildSrc project #31961
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,10 @@ if (project == rootProject) { | |
} | ||
mavenCentral() | ||
} | ||
test { | ||
include "**/*Tests.class" | ||
exclude "**/*IT.class" | ||
} | ||
} | ||
|
||
/***************************************************************************** | ||
|
@@ -152,6 +156,18 @@ if (project != rootProject) { | |
jarHell.enabled = false | ||
thirdPartyAudit.enabled = false | ||
|
||
// tests can't be run with randomized test runner | ||
// it's fine as we run them as part of :buildSrc | ||
test.enabled = false | ||
task integTest(type: Test) { | ||
exclude "**/*Tests.class" | ||
include "**/*IT.class" | ||
testClassesDirs = sourceSets.test.output.classesDirs | ||
classpath = sourceSets.test.runtimeClasspath | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not project.test.classpath? |
||
inputs.dir(file("src/testKit")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this necessary now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't really belong here, it got pulled in as I tried to separate this PR out, and forgot to remove it. The integration tests use these sample Gradle projects. What this line does is makes sure tests are not considered up to date if only this directory changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
} | ||
check.dependsOn(integTest) | ||
|
||
// TODO: re-enable once randomizedtesting gradle code is published and removed from here | ||
licenseHeaders.enabled = false | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not project.test.testClassesDirs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong on this, but I think the source sets are the record of truth on this.
Considering that we add a Gradle Test task and not a randomized one, I think it makes more sense than getting it from the randomzied testing task that we don't even use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok