Mercurial > public > develkit
changeset 14:3cb1ff0297a8
TL-32: Add task for creating test properties.
author | smith@nwoca.org |
---|---|
date | Sun, 26 Dec 2010 16:18:59 -0500 |
parents | dc7212d33458 |
children | d2901f1c52c3 |
files | bootstrap.xml groovy-ant.xml |
diffstat | 2 files changed, 24 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/bootstrap.xml Thu Dec 23 23:32:10 2010 -0500 +++ b/bootstrap.xml Sun Dec 26 16:18:59 2010 -0500 @@ -16,14 +16,14 @@ <ssdt:require-ant file="@{file}"/> <import file="${ssdt.devel.kit}/@{file}"/> </sequential> - </macrodef> + </macrodef> <macrodef name="require-ant" uri="http://www.ssdt-ohio.org/ant/common"> <attribute name="file"/> <sequential> <get dest="${ssdt.devel.kit}/@{file}" - src="${ssdt.devel.kit.src}/@{file}" - usetimestamp="true" verbose="false" ignoreerrors="true" /> + src="${ssdt.devel.kit.src}/@{file}" + usetimestamp="true" verbose="false" ignoreerrors="true" /> </sequential> </macrodef> @@ -32,8 +32,24 @@ <attribute name="src"/> <sequential> <get dest="@{dest}" - src="@{src}" - usetimestamp="true" verbose="false" ignoreerrors="true"/> + src="@{src}" + usetimestamp="true" verbose="false" ignoreerrors="true"/> + </sequential> + </macrodef> + + <macrodef name="test-properties" + description="Creates test properties file from ant properties." + uri="http://www.ssdt-ohio.org/ant/common"> + <attribute name="file" description="Target properties file" default="@{prefix}.properties"/> + <attribute name="prefix" description="Prefix of properties to save to new file"/> + <sequential> + <mkdir dir="${build.test.classes.dir}"/> + <echoproperties destfile="${build.test.classes.dir}/@{file}"> + <propertyset> + <propertyref prefix="@{prefix}."/> + <mapper type="glob" from="@{prefix}.*" to="*"/> + </propertyset> + </echoproperties> </sequential> </macrodef>
--- a/groovy-ant.xml Thu Dec 23 23:32:10 2010 -0500 +++ b/groovy-ant.xml Sun Dec 26 16:18:59 2010 -0500 @@ -5,9 +5,10 @@ <description>Ant tasks shared by Groovy based NetBeans projects.</description> <!-- Following targets need to be copied to the build.xml. - <target name="-javadoc-build" depends="groovydoc"/> + <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"/> + <target name="-pre-compile" depends="-groovy-init-macrodef-javac-groovyc"/> + <target name="-do-test-run" depends="init,compile-test,-pre-test-run,-groovy-do-test-run" if="have.tests" /> end copy --> <target depends="init" name="groovydoc">