buildframework/helium/sf/java/quality/tests/antunit/test_codescanner.ant.xml
author wbernard
Tue, 27 Apr 2010 08:33:08 +0300
changeset 587 85df38eb4012
child 645 b8d81fa19e7d
permissions -rw-r--r--
helium_9.0-a7879c935424
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_serializepath.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
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="test-quality" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <description>Helium antlib core serializepath tests.</description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <taskdef resource="com/nokia/helium/quality/ant/antlib.xml" uri="http://www.nokia.com/helium" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
    <property name="codescanner.output.dir" location="./cs"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
    <property name="codescanner.output.type" value="html"  />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <property name="codescanner.config" location="../data/codescanner_config.xml"  />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
    <path id="src.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
        <pathelement path="../data" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
    </path>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
    <condition property="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
        <os family="windows" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
    </condition>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    <!-- is called prior to the test -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
    <target name="setUp">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
        <delete dir="${codescanner.output.dir}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
        <mkdir dir="${codescanner.output.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
    <!-- is called after the test, even if that caused an error -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
    <target name="tearDown">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
        <delete dir="${codescanner.output.dir}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
    <target name="test-codescanner-linux" unless="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
        <echo message="Codescanner supported only for windows" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    <!--
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
     ** test codescanner only for windows
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
    <target name="test-codescanner" if="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <hlm:codescanner dest="${codescanner.output.dir}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
            format="${codescanner.output.type}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
            configuration="${codescanner.config}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
            <path refid="src.path"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
        </hlm:codescanner>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
        <au:assertLogContains text="Successfully executed codescanner"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
        <au:assertLogContains text="Output format: xml,html"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
        <au:assertLogContains text="data\src\exclude.txt"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
        <au:assertLogContains text="data\src2\exclude.txt"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
        <au:assertFileExists file="${codescanner.output.dir}/problemIndex.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
    <!--
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
     ** test noargs
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
    <target name="test-norargs" if="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
        <au:expectfailure expectedMessage="'dest' attribute must be defined">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
            <hlm:codescanner/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
        </au:expectfailure>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    82
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    83
    <!--
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    84
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    85
     ** test noconf
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    86
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    87
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    88
    <target name="test-noconf" if="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    89
        <au:expectfailure expectedMessage="'configuration' attribute must be defined">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    90
            <hlm:codescanner dest="${codescanner.output.dir}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    91
        </au:expectfailure>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    92
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    93
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    94
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    95
    <!--
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    96
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    97
     ** test noconf
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    98
     **************************************************************
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    99
    -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   100
    <target name="test-codescanner-two-inputs" if="do.codescanner.test">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   101
        <path id="src.path.two.path">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   102
            <pathelement path="../data/src" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   103
            <pathelement path="../data/src2" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   104
        </path>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   105
        <hlm:codescanner dest="${codescanner.output.dir}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   106
            format="${codescanner.output.type}"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   107
            configuration="${codescanner.config}">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   108
            <path refid="src.path.two.path"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   109
        </hlm:codescanner>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   110
        <au:assertLogContains text="Successfully executed codescanner"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   111
        <au:assertLogContains text="Output format: xml,html"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   112
        <au:assertLogContains text="data\src\exclude.txt"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   113
        <au:assertLogContains text="data\src2\exclude.txt"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   114
        <au:assertFileExists file="${codescanner.output.dir}/problemIndex.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   115
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   116
</project>