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

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : test_common.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="test_common" xmlns:au="antlib:org.apache.ant.antunit"
    xmlns:ivy="antlib:org.apache.ivy.ant"
    xmlns:hlm="http://www.nokia.com/helium">
    <description>
        Testing targets
    </description>
    <property environment="env"/>
    <taskdef resource="com/nokia/ant/antlib.xml" uri="http://www.nokia.com/helium" />
    
    <target name="setUp">
        <delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
    </target>

    <target name="tearDown">
        <delete file="../test_helium_data_model.xml_parsed" failonerror="false"/>
    </target>
    
    <!-- Test parsemodel -->
    <target name="test-parsemodel-description">
        <hlm:parsemodel output="../test_helium_data_model.xml_parsed" input="../data/datamodel/data_model_validation_test.xml"/>            
        <!-- Check if parsed file exist -->
        <au:assertFileExists file="../test_helium_data_model.xml_parsed" />
    </target>
    

    <target name="test-exec">
        <au:expectfailure>
            <hlm:exec executable="123"/>
        </au:expectfailure>
        <hlm:exec executable="perl" outputproperty="testexec">
            <arg value="-e"/>
            <arg value="print 'hi'"/>
        </hlm:exec>
        <au:assertPropertyEquals name="testexec" value="hi"/>
    </target>

</project>