Mercurial > public > develkit
diff bootstrap.xml @ 14:3cb1ff0297a8
TL-32: Add task for creating test properties.
author | smith@nwoca.org |
---|---|
date | Sun, 26 Dec 2010 16:18:59 -0500 |
parents | 9358041972c0 |
children | fc114dab4c50 |
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>