1
0
mirror of synced 2026-08-31 22:46:02 +00:00

Improvements in up-to-date checking and use of parallel tests where possible.

This commit is contained in:
Luke Taylor
2010-08-05 02:11:00 +01:00
parent 64375484a1
commit 413b2a06e3
8 changed files with 52 additions and 21 deletions
+7 -4
View File
@@ -13,22 +13,25 @@ dependencies {
task compileJava(overwrite: true, description: 'Compiles AspectJ Source', type: Ajc) {
dependsOn processResources
sourceSet = sourceSets.main
outputs.dir(sourceSet.classesDir)
aspectPath = configurations.aspectpath
}
task compileTestJava(overwrite: true, description: 'Compiles AspectJ Test Source', type: Ajc) {
dependsOn processTestResources, compileJava, jar
sourceSet = sourceSets.test
outputs.dir(sourceSet.classesDir)
aspectPath = files(configurations.aspectpath, jar.archivePath)
}
class Ajc extends DefaultTask {
@Input
SourceSet sourceSet
@Input
FileCollection aspectPath
Ajc() {
logging.captureStandardOutput(LogLevel.INFO)
}
@TaskAction
def compile() {
println "Running ajc ..."
@@ -44,4 +47,4 @@ class Ajc extends DefaultTask {
}
}
}
}
}
+10 -4
View File
@@ -47,10 +47,16 @@ dependencies {
sourceSets.main.compileClasspath += configurations.compileOnly
System.setProperty('apacheDSWorkDir', "${buildDir}/apacheDSWork")
test {
onlyIf {
!project.hasProperty('skipTests')
}
jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m']
jvmArgs = ['-ea', '-Xmx500m']
maxParallelForks = guessMaxForks()
testReport = false
}
def guessMaxForks() {
int processors = Runtime.runtime.availableProcessors()
return Math.max(2, (int) (processors / 2))
}