changeset 11:de6f3a495afd

Move groovy -do-test-run target into groovy script
author smith@nwoca.org
date Thu, 23 Dec 2010 15:51:35 -0500
parents 3c87d0aee1f9
children 9358041972c0
files groovy-ant.xml
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/groovy-ant.xml	Sat Dec 18 21:05:20 2010 -0500
+++ b/groovy-ant.xml	Thu Dec 23 15:51:35 2010 -0500
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="groovy-project-tasks" default="all" basedir=".">
+<project name="groovy-project-tasks" default="all" basedir="."
+        xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3">
  
     <description>Ant tasks shared by Groovy based NetBeans projects.</description>
 
-    <!-- Following targets may need to be copied to the build.xml. -->
+    <!-- Following targets  need to be copied to the build.xml. 
     <target name="-javadoc-build" depends="groovydoc"/>
     <target name="-init-macrodef-junit" depends="-init-macrodef-junit-groovy"/>
     <target name="-pre-compile" depends="-groovy-init-macrodef-javac-groovyc"/>
-    <!-- end copy -->
+    end copy -->
 
     <target depends="init" name="groovydoc">
         <taskdef name="groovydoc"
@@ -73,6 +74,11 @@
         </macrodef>
     </target>
 
+    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-groovy-do-test-run">
+        <property name="groovy.test.includes" value="**/*Test.*"/>
+        <j2seproject3:junit testincludes="${groovy.test.includes}"/>
+    </target>
+
     <target name="-groovy-init-macrodef-javac-groovyc">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute name="srcdir" default="${src.dir}"/>