buildframework/helium/external/helium-antlib/sysdef/tests/antunit/test_join_sysdef.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
permissions -rw-r--r--
helium_7.0-r14027
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
<!-- 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
============================================================================ 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
Name        : test_join_sysdef.ant.xml 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
Description:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
============================================================================
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
-->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
<project name="test-join-sysdef" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
    <description>Helium antlib join sysdef tests.</description>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
    <taskdef resource="com/nokia/helium/sysdef/ant/antlib.xml" uri="http://www.nokia.com/helium" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
    <property name="epocroot" location="../../demo/data" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
    <property name="epocroot.temp" location="${epocroot}/temp" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
    <!-- is called prior to the test -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
    <target name="setUp">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
        <delete dir="${epocroot.temp}" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
        <mkdir dir="${epocroot.temp}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
    <!-- is called after the test, even if that caused an error -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
    <target name="tearDown">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
        <delete dir="${epocroot.temp}" failonerror="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
    <target name="test-noargs">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
        <au:expectfailure expectedMessage="'srcfile' attribute is not defined">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
            <hlm:joinSysdef />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
        <au:assertFileDoesntExist file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
    <target name="test-srcfile">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
        <au:expectfailure expectedMessage="'destfile' attribute is not defined">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
            <hlm:joinSysdef epocroot="${epocroot}" srcfile="${epocroot}/root/system_definition_layer1.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
        <au:assertFileDoesntExist file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    56
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
    <target name="test-srcfile-destfile">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
        <hlm:joinSysdef epocroot="${epocroot}" srcfile="${epocroot}/root/system_definition_layer1.xml" destfile="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
        <au:assertFileExists file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
    <target name="test-srcfile-destfile-wrong-epocroot">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
        <echo>test-srcfile-destfile-wrong-epocroot</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
        <au:expectfailure expectedMessage="Could not find">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
            <hlm:joinSysdef epocroot="${epocroot}/foobar" srcfile="${epocroot}/root/system_definition_layer1.xml" destfile="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    67
        <au:assertFileDoesntExist file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
    <target name="test-wrong-content">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
        <echo>test-wrong-content</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
        <au:expectfailure expectedMessage="javax.xml.transform.TransformerException:">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
            <hlm:joinSysdef epocroot="${epocroot}" srcfile="${epocroot}/root/system_definition_layer3.xml" destfile="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    75
        <au:assertFileDoesntExist file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    76
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    77
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    78
    <target name="test-invalid-src-file">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    79
        <echo>test-wrong-content</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    80
        <au:expectfailure expectedMessage="Could not find source file ">
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    81
            <hlm:joinSysdef epocroot="${epocroot}" srcfile="${epocroot}/root/system_definition_layer_invalid.xml" destfile="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    82
        </au:expectfailure>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    83
        <au:assertFileDoesntExist file="${epocroot.temp}/output.sysdef.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    84
    </target>
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    85
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    86
</project>