Move ML tests to be sub-projects of ML (#33026)
This commit moves the ML QA tests to be a sub-project of ML. The purpose of this refactoring is to enable ML developers to run :x-pack:plugin:ml:check and run the vast majority of a ML tests with a single command (this still does not contain the ML REST tests, nor the upgrade tests). This simplifies local development for faster iteration.
This commit is contained in:
parent
bdfcc326d7
commit
28d12b05b7
|
@ -103,9 +103,19 @@ task internalClusterTest(type: RandomizedTestingTask,
|
||||||
include '**/*IT.class'
|
include '**/*IT.class'
|
||||||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||||
}
|
}
|
||||||
|
|
||||||
check.dependsOn internalClusterTest
|
check.dependsOn internalClusterTest
|
||||||
internalClusterTest.mustRunAfter test
|
internalClusterTest.mustRunAfter test
|
||||||
|
|
||||||
|
// add all sub-projects of the qa sub-project
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
project.subprojects
|
||||||
|
.find { it.path == project.path + ":qa" }
|
||||||
|
.subprojects
|
||||||
|
.findAll { it.path.startsWith(project.path + ":qa") }
|
||||||
|
.each { check.dependsOn it.check }
|
||||||
|
}
|
||||||
|
|
||||||
// also add an "alias" task to make typing on the command line easier
|
// also add an "alias" task to make typing on the command line easier
|
||||||
task icTest {
|
task icTest {
|
||||||
dependsOn internalClusterTest
|
dependsOn internalClusterTest
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import org.elasticsearch.gradle.test.RestIntegTestTask
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
// HACK: please fix this
|
||||||
|
// we want to add the rest api specs for xpack to qa tests, but we
|
||||||
|
// need to wait until after the project is evaluated to only apply
|
||||||
|
// to those that rest tests. this used to be done automatically
|
||||||
|
// when xpack was a plugin, but now there is no place with xpack as a module.
|
||||||
|
// instead, we should package these and make them easy to use for rest tests,
|
||||||
|
// but currently, they must be copied into the resources of the test runner.
|
||||||
|
project.tasks.withType(RestIntegTestTask) {
|
||||||
|
File xpackResources = new File(xpackProject('plugin').projectDir, 'src/test/resources')
|
||||||
|
project.copyRestSpec.from(xpackResources) {
|
||||||
|
include 'rest-api-spec/api/**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
subprojects {
|
||||||
|
Task assemble = project.tasks.findByName('assemble')
|
||||||
|
if (assemble) {
|
||||||
|
project.tasks.remove(assemble)
|
||||||
|
project.build.dependsOn.remove('assemble')
|
||||||
|
}
|
||||||
|
Task dependenciesInfo = project.tasks.findByName('dependenciesInfo')
|
||||||
|
if (dependenciesInfo) {
|
||||||
|
project.precommit.dependsOn.remove('dependenciesInfo')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue