--- a/buildframework/helium/tools/preparation/test/test_preparation.ant.xml Thu Mar 04 15:10:37 2010 +0200
+++ b/buildframework/helium/tools/preparation/test/test_preparation.ant.xml Tue Apr 27 08:33:08 2010 +0300
@@ -41,6 +41,16 @@
<!-- in the normal run we should not have the same build.drive content in the second run -->
<property name="build.drive" value="Z:" />
<import file="../../../helium.ant.xml" />
+ <property name="preparation.temp.dir" location="${helium.build.dir}/antunit/preparation" />
+
+ <target name="setUp">
+ <delete dir="${preparation.temp.dir}" failonerror="false" />
+ <mkdir dir="${preparation.temp.dir}" />
+ </target>
+
+ <target name="tearDown">
+ <delete dir="${preparation.temp.dir}" failonerror="false" />
+ </target>
<!-- Simple Synergy testing. -->
<target name="-test-ccm">
@@ -205,4 +215,27 @@
</target>
+ <path id="test.directory.structure.config">
+ <pathelement path="${preparation.temp.dir}/dir1" />
+ <pathelement path="${preparation.temp.dir}/dir2" />
+ </path>
+
+ <target name="test-create-directory-structure-no-reference">
+ <antcall target="create-directory-structure" />
+ <au:assertLogContains text="'directory.structure.config' reference not found, so not any directory structure will be created." />
+ </target>
+
+ <target name="test-create-directory-structure">
+ <antcall target="create-directory-structure">
+ <reference refid="test.directory.structure.config" torefid="directory.structure.config" />
+ </antcall>
+ <au:assertLogContains text="dir1" />
+ <au:assertLogContains text="dir2" />
+ <au:assertTrue>
+ <available file="${preparation.temp.dir}/dir1" type="dir" />
+ </au:assertTrue>
+ <au:assertTrue>
+ <available file="${preparation.temp.dir}/dir2" type="dir" />
+ </au:assertTrue>
+ </target>
</project>