Skip to content

Commit

Permalink
Build: Make additional test deps of check (#32015)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rjernst authored Jul 17, 2018
1 parent d170ab3 commit 6371d51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ class BuildPlugin implements Plugin<Project> {
additionalTest.configure(commonTestConfig(project))
additionalTest.configure(config)
additionalTest.dependsOn(project.tasks.testClasses)
test.dependsOn(additionalTest)
project.check.dependsOn(additionalTest)
});

project.plugins.withType(ShadowPlugin).whenPluginAdded {
Expand Down
21 changes: 11 additions & 10 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ if (isEclipse) {
compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"

// TODO: remove ScriptDocValuesMissingV6BehaviourTests in 7.0
additionalTest('testScriptDocValuesMissingV6Behaviour'){
include '**/ScriptDocValuesMissingV6BehaviourTests.class'
systemProperty 'es.scripting.exception_for_missing_value', 'false'
}
test {
// these are tested explicitly in separate test tasks
exclude '**/*ScriptDocValuesMissingV6BehaviourTests.class'
}

forbiddenPatterns {
exclude '**/*.json'
exclude '**/*.jmx'
Expand Down Expand Up @@ -329,7 +339,7 @@ if (isEclipse == false || project.path == ":server-tests") {
task integTest(type: RandomizedTestingTask,
group: JavaBasePlugin.VERIFICATION_GROUP,
description: 'Multi-node tests',
dependsOn: test.dependsOn.collect()) {
dependsOn: test.dependsOn) {
configure(BuildPlugin.commonTestConfig(project))
classpath = project.test.classpath
testClassesDirs = project.test.testClassesDirs
Expand All @@ -339,12 +349,3 @@ if (isEclipse == false || project.path == ":server-tests") {
integTest.mustRunAfter test
}

// TODO: remove ScriptDocValuesMissingV6BehaviourTests in 7.0
additionalTest('testScriptDocValuesMissingV6Behaviour'){
include '**/ScriptDocValuesMissingV6BehaviourTests.class'
systemProperty 'es.scripting.exception_for_missing_value', 'false'
}
test {
// these are tested explicitly in separate test tasks
exclude '**/*ScriptDocValuesMissingV6BehaviourTests.class'
}

0 comments on commit 6371d51

Please sign in to comment.