upgrade testing framework jars, improve build scripts to share the testing jars
This commit is contained in:
parent
fea93b7fea
commit
8e8a3a894f
|
@ -1,7 +1,8 @@
|
|||
<component name="libraryTable">
|
||||
<library name="hamcrest">
|
||||
<CLASSES>
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.hamcrest/hamcrest-all/jars/hamcrest-all-1.1.jar!/" />
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.hamcrest/hamcrest-library/jars/hamcrest-library-1.3.RC2.jar!/" />
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.RC2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="testng">
|
||||
<CLASSES>
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.testng/testng/jars/testng-5.10-jdk15.jar!/" />
|
||||
<root url="jar://$GRADLE_REPOSITORY$/com.beust/jcommander/jars/jcommander-1.5.jar!/" />
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.beanshell/bsh/jars/bsh-2.0b4.jar!/" />
|
||||
<root url="jar://$GRADLE_REPOSITORY$/org.testng/testng/jars/testng-5.14.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
|
24
build.gradle
24
build.gradle
|
@ -40,6 +40,30 @@ allprojects {
|
|||
plugins.withType(JavaPlugin).whenPluginAdded {
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
String testSuiteName = project.name
|
||||
suiteName = project.name
|
||||
workingDir = rootProject.projectDir
|
||||
options {
|
||||
suiteNamte = testSuiteName
|
||||
listeners << 'org.elasticsearch.util.testng.Listeners'
|
||||
}
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
if (project.name != "test-testng") {
|
||||
testCompile project(':test-testng')
|
||||
}
|
||||
testCompile('org.testng:testng:5.14.6') { transitive = false }
|
||||
testCompile('com.beust:jcommander:1.5') { transitive = false }
|
||||
testCompile('org.beanshell:bsh:2.0b4') { transitive = false }
|
||||
testCompile('org.hamcrest:hamcrest-core:1.3.RC2') { transitive = false }
|
||||
testCompile('org.hamcrest:hamcrest-library:1.3.RC2') { transitive = false }
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
|
@ -13,14 +13,4 @@ sourceSets.test.resources.srcDirs 'src/test/java'
|
|||
|
||||
dependencies {
|
||||
compile project(':elasticsearch')
|
||||
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
|
|
@ -41,10 +41,6 @@ dependencies {
|
|||
compile 'org.apache.lucene:lucene-analyzers:3.0.3'
|
||||
compile 'org.apache.lucene:lucene-queries:3.0.3'
|
||||
compile 'org.apache.lucene:lucene-fast-vector-highlighter:3.0.3'
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile('org.hamcrest:hamcrest-all:1.1') { transitive = false }
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
@ -79,14 +75,6 @@ javadoc {
|
|||
maxMemory = "1g"
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
|
|
|
@ -13,17 +13,4 @@ sourceSets.test.resources.srcDirs 'src/test/java'
|
|||
|
||||
dependencies {
|
||||
compile project(':elasticsearch')
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
systemProperties["java.net.preferIPv4Stack"] = "true"
|
||||
}
|
||||
|
|
|
@ -11,12 +11,5 @@ sourceSets.test.resources.srcDirs 'src/test/java'
|
|||
|
||||
dependencies {
|
||||
compile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
compile('org.slf4j:slf4j-api:1.5.11') { transitive = false }
|
||||
compile('org.slf4j:slf4j-log4j12:1.5.11') { transitive = false }
|
||||
compile('log4j:log4j:1.2.15') { transitive = false }
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
systemProperties['es.test.log.conf'] = 'log4j-gradle.properties'
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.testng.ITestResult;
|
|||
*/
|
||||
public class Listeners implements ITestListener {
|
||||
|
||||
private final ITestListener[] listeners = new ITestListener[]{new DotTestListener(), new LoggingListener()};
|
||||
private final ITestListener[] listeners = new ITestListener[]{new LoggingListener()};
|
||||
|
||||
@Override public void onTestStart(ITestResult result) {
|
||||
for (ITestListener listener : listeners) {
|
||||
|
|
|
@ -37,6 +37,8 @@ public class LoggingListener extends TestListenerAdapter {
|
|||
String logsDir = context.getOutputDirectory() + "/logs";
|
||||
deleteRecursively(new File(logsDir), false);
|
||||
System.setProperty("test.log.dir", logsDir);
|
||||
System.setProperty("es.path.data", context.getOutputDirectory() + "/data");
|
||||
System.setProperty("es.path.work", context.getOutputDirectory() + "/work");
|
||||
}
|
||||
|
||||
@Override public void onTestStart(ITestResult result) {
|
||||
|
|
|
@ -36,19 +36,6 @@ dependencies {
|
|||
distLib('com.ibm.icu:icu4j:4.4') { transitive = false }
|
||||
compile('org.apache.lucene:lucene-collation:3.0.3') { transitive = false }
|
||||
distLib('org.apache.lucene:lucene-collation:3.0.3') { transitive = false }
|
||||
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -40,18 +40,6 @@ dependencies {
|
|||
distLib("commons-codec:commons-codec:1.3") { transitive = false }
|
||||
distLib("commons-logging:commons-logging:1.1.1") { transitive = false }
|
||||
distLib("commons-httpclient:commons-httpclient:3.0.1") { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -33,18 +33,6 @@ dependencies {
|
|||
|
||||
distLib("org.apache.hadoop:hadoop-core:0.20.2") { transitive = false }
|
||||
distLib("commons-logging:commons-logging:1.1.1") { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -32,21 +32,9 @@ dependencies {
|
|||
|
||||
groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.7.6'
|
||||
distLib('org.codehaus.groovy:groovy-all:1.7.6') { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
testCompile('junit:junit:4.8.1') {transitive = false}
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
[explodedDistDir]*.mkdirs()
|
||||
|
||||
|
|
|
@ -32,18 +32,6 @@ dependencies {
|
|||
|
||||
compile('rhino:js:1.7R2')
|
||||
distLib('rhino:js:1.7R2') { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -32,18 +32,6 @@ dependencies {
|
|||
|
||||
compile('org.python:jython:2.5.2rc2') { transitive = false }
|
||||
distLib('org.python:jython:2.5.2rc2') { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -34,19 +34,6 @@ dependencies {
|
|||
|
||||
compile('org.apache.tika:tika-app:0.8') { transitive = false }
|
||||
distLib('org.apache.tika:tika-app:0.8') { transitive = false }
|
||||
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -31,18 +31,6 @@ configurations {
|
|||
|
||||
dependencies {
|
||||
compile project(':elasticsearch')
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -36,19 +36,6 @@ dependencies {
|
|||
compile("commons-io:commons-io:1.2") { transitive = false }
|
||||
distLib('com.rabbitmq:amqp-client:2.2.0') { transitive = false }
|
||||
distLib("commons-io:commons-io:1.2") { transitive = false }
|
||||
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -34,19 +34,6 @@ dependencies {
|
|||
|
||||
compile('org.twitter4j:twitter4j-core:2.1.7') { transitive = false }
|
||||
distLib('org.twitter4j:twitter4j-core:2.1.7') { transitive = false }
|
||||
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -31,18 +31,6 @@ configurations {
|
|||
|
||||
dependencies {
|
||||
compile project(':elasticsearch')
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
|
@ -36,20 +36,9 @@ repositories {
|
|||
dependencies {
|
||||
compile project(':elasticsearch')
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
testCompile 'spy:memcached:2.5'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
[explodedDistDir]*.mkdirs()
|
||||
|
||||
|
|
|
@ -40,18 +40,6 @@ dependencies {
|
|||
distLib("org.elasticsearch:es-libthrift:0.5.0") { transitive = false }
|
||||
distLib 'org.slf4j:slf4j-api:1.5.11'
|
||||
distLib('org.slf4j:slf4j-log4j12:1.5.11') { transitive = false }
|
||||
|
||||
testCompile project(':test-testng')
|
||||
testCompile('org.testng:testng:5.10:jdk15') { transitive = false }
|
||||
testCompile 'org.hamcrest:hamcrest-all:1.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useTestNG()
|
||||
jmvArgs = ["-ea", "-Xmx1024m"]
|
||||
suiteName = project.name
|
||||
listeners = ["org.elasticsearch.util.testng.Listeners"]
|
||||
systemProperties["es.test.log.conf"] = System.getProperty("es.test.log.conf", "log4j-gradle.properties")
|
||||
}
|
||||
|
||||
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
|
||||
|
|
Loading…
Reference in New Issue