buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/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
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"?>
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_diamonds.ant.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
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
-->
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    23
<project name="test-diamonds-invalid-template" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <description>Helium Antlib diamonds unittests.</description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
    <property environment="env" />
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    26
    <taskdef resource="com/nokia/helium/core/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    27
    <taskdef name="xpathtest" classname="se.jtech.ant.xpath.XPathEvaluatorTask" onerror="ignore"/>    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    28
    <property name="diamonds.enabled" value="true" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    29
    <property name="diamonds.unitest.dir" location="${ant.file.test-diamonds-invalid-template}/../../../" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
    <import file="../../../../../../nokia/companyproperties.ant.xml" optional="true"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
    <property name="diamonds.output.dir" location="${temp.dir}/output" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
    <property name="diamonds.template.dir" location="${diamonds.unitest.dir}/data/invalid_templates" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
    <property name="build.family" value="test_new_hlm"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
    <property name="id" value="123"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
    <property name="name" value="${build.family}_${id}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
    <property name="build.system" value="ec-helium"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
    <property name="compile.log.input" location="${diamonds.unitest.dir}/data/compile.log.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    <property name="codescanner.log.input" location="${diamonds.unitest.dir}/data/problemIndex.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
    <property name="policy.log.input" location="${diamonds.unitest.dir}/data/policy.log.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    <property name="invalid.target.input.file" location="${diamonds.unitest.dir}/data/invalid.target.input.log.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    <property name="symsee.version" value="9.1.0" />
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    42
    <import file="../../config/diamonds_config_default.ant.xml" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    <target name="unittest" depends="unittest-diamonds" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
    <target name="unittest-diamonds" >
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
        <delete dir="${diamonds.output.dir}" failonerror="false"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
        <mkdir dir="${diamonds.output.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
        <antcall target="test-all" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
    <dirname property="project.dir" file="${ant.file.test-diamonds}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    <target name="version">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
        <echo message="version target for diamonds to verify sending data to diamonds" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
    <target name="diamonds" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
    <target name="compile-target">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <echo message="verify the build stage with input source xml file" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
    <target name="codescanner">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
        <echo message="target verification with input source xml file" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
    <target name="create-bom-log">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
        <echo message="target without input file and just to send the data" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
    <target name="invalid-template-file">
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    73
        <echo message="expected message: ${diamonds.template-dir}${file.separator}invalid-target-input-file.ftl doesn't exists" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    74
        <au:expectfailure expectedMessage="input file : ${diamonds.template-dir}${file.separator}invalid-target-input-file.ftl doesn't exists" >
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    75
            <hlm:targetMessageTrigger id="invalid-target-input-file.id" target="invalid-target-input-file">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    76
                <hlm:fmppMessage sourceFile="${diamonds.template-dir}${file.separator}invalid-target-input-file.ftl">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    77
                    <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    78
                        ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    79
                    </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    80
                </hlm:fmppMessage>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    81
            </hlm:targetMessageTrigger>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    82
        </au:expectfailure>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
    <target name="invalid-ant-properties-input">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
        <echo message="target with invalid ant properties input" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
    <target name="test-invalid-ant-properties-input">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
        <antcall target="invalid-ant-properties-input" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
    <target name="test-version">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
        <antcall target="version" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
    <target name="test-buildid-set">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
        <echo>${diamonds.build.id}</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
        <au:assertTrue>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
            <isset property="diamonds.build.id"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
        </au:assertTrue>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   102
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   103
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
    <target name="test-buildid-notset">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
        <au:assertFalse>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
            <isset property="diamonds.build.id"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
        </au:assertFalse>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   110
    <target name="test-invalid-template-file">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   111
            <antcall target="invalid-template-file" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   112
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   113
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   114
    <target name="test-verify-targets">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   115
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   116
            <isset property="diamonds.build.id"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   117
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   118
     </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   119
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   120
    <target name="test-verify-stages">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   121
        <get src="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}?fmt=xml"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   122
             dest="${temp.dir}/test-verify-stages.xml" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   123
             usetimestamp="true" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   124
        <xpathtest xmlfile="${temp.dir}/test-verify-stages.xml">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   125
            <namespace uri="" prefix=""/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   126
            <xpath expression="/diamonds-build/stages/stage[name='invalid-template-sequence']"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   127
        </xpathtest>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   128
    </target>        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   129
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   130
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   131
    <target name="test-all" depends="test-buildid-notset, diamonds, test-buildid-set, test-invalid-ant-properties-input,
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   132
        test-invalid-template-file, test-verify-targets, test-verify-stages" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   133
</project>