buildframework/helium/tools/compile/sbs/test/test_sbs.ant.xml
author wbernard
Wed, 23 Dec 2009 19:29:07 +0200
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
permissions -rw-r--r--
helium_7.0-r14027

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : test_sbs.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:
Used to test get variable and checking its value for SBS build config data.

============================================================================
-->
<project name="test_sbs" xmlns:hlm="http://www.nokia.com/helium" xmlns:au="antlib:org.apache.ant.antunit" >
    <description>
    Used to test get variable and checking its value for SBS build config data.
    </description>

    <taskdef resource="com/nokia/helium/sbs/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
    
    <hlm:sbsinput id="test-sbs-armv5">
        <sbsOptions>
            <arg line="-c armv5" />
        </sbsOptions>
    </hlm:sbsinput>

    <hlm:sbsinput id="test-sbs-winscw">
        <sbsOptions>
            <arg line="-c winscw" />
        </sbsOptions>
    </hlm:sbsinput>

    <hlm:sbsinput id="test-sbs-both">
        <sbsOptions>
            <arg line="-c winscw -c armv5" />
        </sbsOptions>
    </hlm:sbsinput>


    <!-- test the variable sbs.config set to armv5 and check it calls the set-arm-version-test
    target so that I can check the code to do the get variable and read it works properly. -->
    <target name="test-sbs-armv5">
        <hlm:getVariableValue name="-c" property="compilevalue.var">
            <hlm:sbsinput refid="test-sbs-armv5" />
        </hlm:getVariableValue>
        <au:assertTrue>
            <matches string="${compilevalue.var}" pattern="arm.*"/>
        </au:assertTrue>
    </target>

    <!-- test the variable sbs.config set to winscw and check it does not call the set-arm-version-test
    target so that I can check the code to do the get variable and read it works properly. -->
    <target name="test-sbs-winscw">
        <hlm:getVariableValue name="-c" property="compilevalue.var">
            <hlm:sbsinput refid="test-sbs-winscw" />
        </hlm:getVariableValue>
        <au:assertFalse>
            <matches string="${compilevalue.var}" pattern="arm.*"/>
        </au:assertFalse>
    </target>

    <!-- test the variable sbs.config set to armv5,winscw and check it calls the set-arm-version-test
    target so that I can check the code to do the get variable and read it works properly. -->
    <target name="test-sbs-both">
        <hlm:getVariableValue name="-c" property="compilevalue.var">
            <hlm:sbsinput refid="test-sbs-both" />
        </hlm:getVariableValue>
        <au:assertTrue>
            <matches string="${compilevalue.var}" pattern="arm.*"/>
        </au:assertTrue>
    </target>
</project>