|
|
@@ -89,9 +89,24 @@ dependencies {
|
|
|
|
|
|
compile 'net.java.dev.jna:jna:4.1.0', optional
|
|
|
|
|
|
- testCompile("org.elasticsearch:test-framework:${version}") {
|
|
|
- // tests use the locally compiled version of core
|
|
|
- exclude group: 'org.elasticsearch', module: 'elasticsearch'
|
|
|
+ if (isEclipse == false || project.path == "${projectsPrefix}:core-tests") {
|
|
|
+ testCompile("org.elasticsearch:test-framework:${version}") {
|
|
|
+ // tests use the locally compiled version of core
|
|
|
+ exclude group: 'org.elasticsearch', module: 'elasticsearch'
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+if (isEclipse) {
|
|
|
+ // in eclipse the project is under a fake root, we need to change around the source sets
|
|
|
+ sourceSets {
|
|
|
+ if (project.path == "${projectsPrefix}:core") {
|
|
|
+ main.java.srcDirs = ['java']
|
|
|
+ main.resources.srcDirs = ['resources']
|
|
|
+ } else {
|
|
|
+ test.java.srcDirs = ['java']
|
|
|
+ test.resources.srcDirs = ['resources']
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -104,19 +119,21 @@ forbiddenPatterns {
|
|
|
exclude '**/org/elasticsearch/cluster/routing/shard_routes.txt'
|
|
|
}
|
|
|
|
|
|
-task integTest(type: RandomizedTestingTask,
|
|
|
- group: JavaBasePlugin.VERIFICATION_GROUP,
|
|
|
- description: 'Multi-node tests',
|
|
|
- dependsOn: test.dependsOn) {
|
|
|
- configure(BuildPlugin.commonTestConfig(project))
|
|
|
- classpath = project.test.classpath
|
|
|
- testClassesDir = project.test.testClassesDir
|
|
|
- include '**/*IT.class'
|
|
|
-}
|
|
|
-check.dependsOn integTest
|
|
|
-integTest.mustRunAfter test
|
|
|
+if (isEclipse == false || project.path == "${projectsPrefix}:core-tests") {
|
|
|
+ task integTest(type: RandomizedTestingTask,
|
|
|
+ group: JavaBasePlugin.VERIFICATION_GROUP,
|
|
|
+ description: 'Multi-node tests',
|
|
|
+ dependsOn: test.dependsOn) {
|
|
|
+ configure(BuildPlugin.commonTestConfig(project))
|
|
|
+ classpath = project.test.classpath
|
|
|
+ testClassesDir = project.test.testClassesDir
|
|
|
+ include '**/*IT.class'
|
|
|
+ }
|
|
|
+ check.dependsOn integTest
|
|
|
+ integTest.mustRunAfter test
|
|
|
|
|
|
-RestSpecHack.configureDependencies(project)
|
|
|
-Task copyRestSpec = RestSpecHack.configureTask(project, true)
|
|
|
-integTest.dependsOn copyRestSpec
|
|
|
+ RestSpecHack.configureDependencies(project)
|
|
|
+ Task copyRestSpec = RestSpecHack.configureTask(project, true)
|
|
|
+ integTest.dependsOn copyRestSpec
|
|
|
+}
|
|
|
|