buildframework/helium/sf/java/legacy/tests/antunit/test_common.ant.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 587 85df38eb4012
permissions -rw-r--r--
helium_11.0.0-e00f171ca185
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : test_common.ant.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="test_common" xmlns:au="antlib:org.apache.ant.antunit"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    xmlns:ivy="antlib:org.apache.ivy.ant"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    xmlns:hlm="http://www.nokia.com/helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
        Testing targets
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
    </description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <property environment="env"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
    <taskdef resource="com/nokia/ant/antlib.xml" uri="http://www.nokia.com/helium" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
    <target name="setUp">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
        <delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
    <target name="tearDown">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
        <delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    <!-- Test parsemodel -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    <target name="test-parsemodel-description">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
        <hlm:parsemodel output="../test_helium_data_model.xml_parsed" input="../data/datamodel/data_model_validation_test.xml"/>            
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
        <!-- Check if parsed file exist -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
        <au:assertFileExists file="../test_helium_data_model.xml_parsed" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
    <target name="test-exec">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
        <au:expectfailure>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
            <hlm:exec executable="123"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
        </au:expectfailure>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
        <hlm:exec executable="perl" outputproperty="testexec">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
            <arg value="-e"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
            <arg value="print 'hi'"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
        </hlm:exec>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
        <au:assertPropertyEquals name="testexec" value="hi"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
</project>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60