628
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_diamonds_templates.ant.xml
|
|
5 |
Part of : Helium
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="test_common" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>
|
|
25 |
Testing targets.
|
|
26 |
</description>
|
|
27 |
|
|
28 |
<property environment="env"/>
|
|
29 |
|
|
30 |
<property name="helium.dir" location="../../.." />
|
|
31 |
<property name="temp.dir" location="${helium.dir}/build/temp" />
|
|
32 |
<import file="${helium.dir}/helium.ant.xml" />
|
|
33 |
<property name="test.temp.dir" location="${helium.build.dir}/antunit/diamonds-templates" />
|
|
34 |
|
|
35 |
<target name="setUp">
|
|
36 |
<mkdir dir="${test.temp.dir}" />
|
|
37 |
<delete dir="${test.temp.dir}" />
|
|
38 |
<mkdir dir="${test.temp.dir}" />
|
|
39 |
</target>
|
|
40 |
|
|
41 |
<target name="tearDown">
|
|
42 |
<delete dir="${test.temp.dir}" />
|
|
43 |
</target>
|
|
44 |
|
|
45 |
<target name="test-diamonds-signal-template-without-signal-data">
|
|
46 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_signal.xml.ftl"
|
|
47 |
outputfile="${test.temp.dir}/diamonds_signal.xml">
|
|
48 |
<data expandProperties="yes">
|
|
49 |
ant: antProperties()
|
|
50 |
</data>
|
|
51 |
</fmpp>
|
|
52 |
<loadfile property="diamonds.xml" srcFile="${test.temp.dir}/diamonds_signal.xml" />
|
|
53 |
<echo>${diamonds.xml}</echo>
|
|
54 |
<au:assertTrue message="No signals are pushed to diamonds">
|
|
55 |
<not>
|
|
56 |
<contains string="${diamonds.xml}" substring="<signal>" />
|
|
57 |
</not>
|
|
58 |
</au:assertTrue>
|
|
59 |
</target>
|
|
60 |
|
|
61 |
<target name="test-diamonds-signal-template">
|
|
62 |
<property name="diamond.signal.name.0" value="fakeSignal" />
|
|
63 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/diamonds_signal.xml.ftl"
|
|
64 |
outputfile="${test.temp.dir}/diamonds_signal.xml">
|
|
65 |
<data expandProperties="yes">
|
|
66 |
ant: antProperties()
|
|
67 |
</data>
|
|
68 |
</fmpp>
|
|
69 |
<loadfile property="diamonds.xml" srcFile="${test.temp.dir}/diamonds_signal.xml" />
|
|
70 |
<echo>${diamonds.xml}</echo>
|
|
71 |
<au:assertTrue message="One signal is defined.">
|
|
72 |
<contains string="${diamonds.xml}" substring="<signal>" />
|
|
73 |
</au:assertTrue>
|
|
74 |
<au:assertTrue message="One name is defined.">
|
|
75 |
<contains string="${diamonds.xml}" substring="<name>fakeSignal</name>" />
|
|
76 |
</au:assertTrue>
|
|
77 |
</target>
|
|
78 |
</project>
|