Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 67eb7873f5
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (69 sloc) 2.833 kb
test {
jvmArgs "-ea", "-Xms${groovyJUnit_ms}", "-Xmx${groovyJUnit_mx}", "-XX:PermSize=${groovyJUnit_permSize}", "-XX:MaxPermSize=${groovyJUnit_maxPermSize}"
def headless = System.properties['java.awt.headless']
if (headless == 'true') {
systemProperties 'java.awt.headless': "true"
}
def testdb = System.properties['groovy.testdb.props']
if (testdb) {
systemProperties 'groovy.testdb.props': testdb
}
systemProperties 'apple.awt.UIElement': "true", "javadocAssertion.src.dir": './src/main'
systemProperties "gradle.home": gradle.gradleHomeDir // this is needed by the security.policy
doFirst {
// this is needed by the security.policy. We set it at execution time to avoid resolving a configuration when not needed.
// temp hack
// systemProperties "gradle.junit": configurations.testCompile.fileCollection { dep -> dep.name == 'junit' }.singleFile.absolutePath
}
classpath = files('src/test') + classpath
// forkEvery = 10
// maxParallelForks = Runtime.runtime.availableProcessors()
scanForTestClasses = false
ignoreFailures = false
ext.resultText = ''
includes = getIncludePattern()
doLast {
ant.delete {
fileset(dir: '.', includes: '*.class')
}
}
}
boolean isRunningOnCI() {
new File('.').absolutePath.contains('ci.codehaus.org')
}
logger.lifecycle "Detected ${isRunningOnCI()?'Continuous Integration environment':'development environment'}"
allprojects {
test {
forkEvery = isRunningOnCI()?50:200
maxParallelForks = isRunningOnCI()?1:Runtime.runtime.availableProcessors()
}
}
tasks.addRule("Pattern: testSingle<Name> will test **/<Name>.class") {String taskName ->
if (taskName.startsWith("testSingle")) {
tasks.add(taskName).dependsOn(test)
test.includes = ['**/' + taskName.substring(10) + '.class']
test.outputs.upToDateWhen { false }
}
}
def getIncludePattern() {
def baseInclude = ['UberTestCaseBugs.class',
'UberTestCaseGroovySourceCodehausPackages.class',
'UberTestCaseGroovySourceRootPackage.class',
"UberTestCaseGroovySourceSubPackages.class",
"UberTestCaseJavaSourceCodehausPackages.class",
"UberTestCaseJavaSourceGroovyPackagesNonSecurity.class",
"UberTestCaseTCK.class"
// temporarily disable security test suite, see GRADLE-2170
//,"UberTestCaseJavaSourceGroovyPackagesSecurity.class"
]
if (System.properties['junit.network']) {
baseInclude += ['groovy/grape/*Test.class']
}
if (!isJava15()) {
baseInclude += [
"UberTestCaseGroovySourceSubPackages_VM6.class",
"UberTestCaseGroovySourceCodehausPackages_VM6.class"
]
}
baseInclude
}
Jump to Line
Something went wrong with that request. Please try again.