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