Skip to content

Commit 6371d51

Browse files
authored
Build: Make additional test deps of check (#32015)
This commit moves additional unit test runners from being dependencies of the test task to dependencies of check. Without this change, reproduce lines are incorrect due to the additional test runner not matching any of the reproduce class/method info. closes #31964
1 parent d170ab3 commit 6371d51

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ class BuildPlugin implements Plugin<Project> {
835835
additionalTest.configure(commonTestConfig(project))
836836
additionalTest.configure(config)
837837
additionalTest.dependsOn(project.tasks.testClasses)
838-
test.dependsOn(additionalTest)
838+
project.check.dependsOn(additionalTest)
839839
});
840840

841841
project.plugins.withType(ShadowPlugin).whenPluginAdded {

server/build.gradle

+11-10
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ if (isEclipse) {
156156
compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
157157
compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
158158

159+
// TODO: remove ScriptDocValuesMissingV6BehaviourTests in 7.0
160+
additionalTest('testScriptDocValuesMissingV6Behaviour'){
161+
include '**/ScriptDocValuesMissingV6BehaviourTests.class'
162+
systemProperty 'es.scripting.exception_for_missing_value', 'false'
163+
}
164+
test {
165+
// these are tested explicitly in separate test tasks
166+
exclude '**/*ScriptDocValuesMissingV6BehaviourTests.class'
167+
}
168+
159169
forbiddenPatterns {
160170
exclude '**/*.json'
161171
exclude '**/*.jmx'
@@ -329,7 +339,7 @@ if (isEclipse == false || project.path == ":server-tests") {
329339
task integTest(type: RandomizedTestingTask,
330340
group: JavaBasePlugin.VERIFICATION_GROUP,
331341
description: 'Multi-node tests',
332-
dependsOn: test.dependsOn.collect()) {
342+
dependsOn: test.dependsOn) {
333343
configure(BuildPlugin.commonTestConfig(project))
334344
classpath = project.test.classpath
335345
testClassesDirs = project.test.testClassesDirs
@@ -339,12 +349,3 @@ if (isEclipse == false || project.path == ":server-tests") {
339349
integTest.mustRunAfter test
340350
}
341351

342-
// TODO: remove ScriptDocValuesMissingV6BehaviourTests in 7.0
343-
additionalTest('testScriptDocValuesMissingV6Behaviour'){
344-
include '**/ScriptDocValuesMissingV6BehaviourTests.class'
345-
systemProperty 'es.scripting.exception_for_missing_value', 'false'
346-
}
347-
test {
348-
// these are tested explicitly in separate test tasks
349-
exclude '**/*ScriptDocValuesMissingV6BehaviourTests.class'
350-
}

0 commit comments

Comments
 (0)