if (properties['use.grails.home']) { ant.property(name:"grails.home", value:properties['env.GRAILS_HOME']) properties['dont.checkout.grails'] = "true" } else { ant.property(name:"grails.home", location:"checkout/grails") if (properties['force.checkout']) { ant.delete(dir:properties['grails.home'], failonerror:"false") } if (new File(properties['grails.home']).exists()) { properties['dont.checkout.grails'] = "true" } } Checking out Grails Updating Grails GRAILS_HOME=${grails.home} String scriptName = ant.antProject.properties."test.script.name" def scriptFiles = new File("scripts").listFiles().findAll { it.name.endsWith('.xml') } if(scriptName) { println "Running functional test script: $scriptName" def file = scriptFiles.find{ it.name.startsWith(scriptName) } if(file) { ant.ant(antfile:file, inheritRefs:true) } else { ant.fail("No test script found for name $scriptName") } } else { println "Running all functional test scripts!" scriptFiles.each { file -> ant.ant(antfile:file, inheritRefs:true) } } (\w.*)\/ Creating new Grails app ${newWebApp} and running some tests on it Checking out functional test application from :${app.checkout.url}${projectName} Updating local copy of functional test application from :${app.checkout.url}${projectName}