buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
permissions -rw-r--r--
helium_11.0.0-e00f171ca185

<?xml version="1.0"?>
<!-- 
============================================================================ 
Name        : test_diamonds.ant.xml 
Part of     : Helium AntLib

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-diamonds-invalid-address" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
    <description>Helium Antlib diamonds unittests.</description>
    <property environment="env" />
    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
    <property name="diamonds.enabled" value="true" />
    <property name="diamonds.host" value="invalid.server.local" />
    <property name="diamonds.port" value="80" />
    <property name="diamonds.path" value="/diamonds/builds/" />
    <property name="diamonds.mail" value="diamonds@invalid.server.local" />
    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-address}/../../../" />
    <property name="diamonds.output.dir" location="${temp.dir}/output" />
    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/templates" />
    <property name="build.family" value="test_new_hlm"/>
    <property name="id" value="123"/>
    <property name="name" value="${build.family}_${id}"/>
    <property name="build.system" value="ec-helium"/>
    <property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" />
    <property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" />
    <property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" />
    <property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" />
    <property name="symsee.version" value="9.1.0" />
    <import file="../../config/diamonds_config_default.ant.xml" />

    <target name="unittest" depends="unittest-diamonds" />
    
    <target name="unittest-diamonds" >
        <delete dir="${diamonds.output.dir}" failonerror="false"/>
        <mkdir dir="${diamonds.output.dir}"/>
        <antcall target="test-all" />
    </target>
    
    <dirname property="project.dir" file="${ant.file.test-diamonds}" />
    <target name="version">
        <echo message="version target for diamonds to verify sending data to diamonds" />
    </target>

    <target name="diamonds" />

    <target name="compile-target">
        <echo message="verify the build stage with input source xml file" />
    </target>

    <target name="codescanner">
        <echo message="target verification with input source xml file" />
    </target>

    <target name="create-bom-log">
        <echo message="target without input file and just to send the data" />
    </target>

    <target name="invalid-target-input-file">
        <echo message="target with invalid input source xml file" />
    </target>

    <target name="invalid-stage-input-file">
        <echo message="stage with invalid input source xml file" />
    </target>

    <target name="invalid-template-file">
        <echo message="target with invalid template-file" />
    </target>


    <target name="non-existing-ant-properties">
        <echo message="target with non-existing-ant-properties" />
    </target>

    <target name="invalid-diamonds-server-properties">
        <echo message="target with invalid-diamonds-server-properties" />
    </target>

    <target name="defer-type">
        <echo message="version target for diamonds to verify sending data to diamonds" />
    </target>

    <target name="test-invalid-target-input-file">
        <antcall target="invalid-target-input-file" />
    </target>

    <target name="test-invalid-stage-input-file">
        <antcall target="invalid-target-input-file" />
        <echo message="stage with invalid input source xml file" />
    </target>

    <target name="test-invalid-template-file">
        <antcall target="invalid-template-file" />
    </target>

    <target name="test-non-existing-ant-properties">
        <antcall target="non-existing-ant-properties" />
    </target>


    <target name="test-version">
        <antcall target="version" />
    </target>

    <target name="test-buildid-set">
        <echo>${diamonds.build.id}</echo>
        <au:assertFalse>
            <isset property="diamonds.build.id"/>
        </au:assertFalse>
    </target>

    <target name="test-buildid-notset">
        <au:assertFalse>
            <isset property="diamonds.build.id"/>
        </au:assertFalse>
    </target>

    <target name="test-verify-targets">
        <au:assertFalse>
            <isset property="diamonds.build.id"/>
        </au:assertFalse>
    </target>        

    <target name="test-verify-stages">
        <au:assertFalse>
            <isset property="diamonds.build.id"/>
        </au:assertFalse>
    </target>        

    <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-version,
        test-verify-stages, test-verify-targets" />
</project>