buildframework/helium/sf/java/metadata/tests/antunit/test_sbs_input.ant.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
permissions -rw-r--r--
helium_11.0.0-e00f171ca185
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     1
<!-- 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     2
============================================================================ 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     3
Name        : test_sbs_input.ant.xml 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     4
Part of     : Helium AntLib
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     5
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     6
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     7
All rights reserved.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     8
This component and the accompanying materials are made available
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
     9
under the terms of the License "Eclipse Public License v1.0"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    10
which accompanies this distribution, and is available
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    11
at the URL "http://www.eclipse.org/legal/epl-v10.html".
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    12
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    13
Initial Contributors:
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    14
Nokia Corporation - initial contribution.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    15
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    16
Contributors:
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    17
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    18
Description:
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    19
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    20
============================================================================
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    21
-->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    22
<project name="test-sbs-input" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    23
    <description>Helium metadata SBS input unittests.</description>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    24
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    25
    <dirname property="project.dir" file="${ant.file.test-metadata-regex}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    26
    <taskdef resource="com/nokia/helium/metadata/ant/antlib.xml" uri="http://www.nokia.com/helium" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    27
    <taskdef name="fmpp" classname="fmpp.tools.AntTask" onerror="report"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    28
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    29
    <target name="setUp">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    30
        <echo>---=====================================---</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    31
        <mkdir dir="${test.temp.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    32
        <delete dir="${test.temp.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    33
        <mkdir dir="${test.temp.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    34
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    35
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    36
    <target name="tearDown">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    37
        <delete dir="${test.temp.dir}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    38
        <echo>---=====================================---</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    39
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    40
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    41
    <hlm:metadatafilterset id="error.filterset">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    42
        <hlm:metadatafilter severity="error" regex="^ERROR: .*" description="Simple error pattern"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    43
        <hlm:metadatafilter severity="warning" regex="^WARNING: .*" description="Simple warning pattern"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    44
    </hlm:metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    45
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    46
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    47
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    48
    <!-- Test categorization for sbs scanlog
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    49
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    50
    <target name="test-categorization">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    51
        <echo message="categorization validation" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    52
        <hlm:metadatarecord database="${test.temp.dir}/categorization_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    53
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    54
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    55
                    <include  name="categorization.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    56
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    57
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    58
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    59
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    60
        <fmpp sourceFile="${project.dir}/../data/sbs/parsing_result.ini.ftl"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    61
                     outputfile="${test.temp.dir}/categorization_db_result.ini">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    62
            <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    63
                dbPath: ${test.temp.dir}/categorization_db
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    64
                ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    65
            </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    66
        </fmpp>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    67
        <property file="${test.temp.dir}/categorization_db_result.ini" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    68
        <echo>number.of.logs: ${number.of.logs}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    69
        <echo>number.of.execution.times: ${number.of.execution.times}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    70
        <echo>number.of.components: ${number.of.components}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    71
        <echo>execution.time.0: ${execution.time.0}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    72
        <echo>number.of.component.times: ${number.of.component.times}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    73
        <au:assertTrue message="Invalid number of logs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    74
            <equals arg1="${number.of.logs}" arg2="1" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    75
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    76
        <au:assertTrue message="Invalid number of execution time">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    77
            <equals arg1="${number.of.execution.times}" arg2="1" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    78
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    79
        <au:assertTrue message="Invalid number of logs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    80
            <equals arg1="${execution.time.0}" arg2="226" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    81
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    82
        <au:assertTrue message="Invalid number of components">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    83
            <equals arg1="${number.of.components}" arg2="2" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    84
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    85
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/categorization.log" database="${test.temp.dir}/categorization_db" property="cleanlog_errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    86
        <echo>cleanlog_errors: ${cleanlog_errors}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    87
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    88
            <equals arg1="${cleanlog_errors}" arg2="2"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    89
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    90
        <au:assertTrue message="Invalid number of component times">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    91
            <equals arg1="${number.of.component.times}" arg2="2" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    92
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    93
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    94
       
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    95
    <target name="test-categorization-component-check">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    96
        <echo message="component error check for categorization" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    97
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    98
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
    99
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   100
                    <include  name="categorization_compile.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   101
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   102
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   103
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   104
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   105
        <fmpp sourceFile="${project.dir}/../data/templates/component_categorization.txt.ftl"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   106
                     outputfile="${test.temp.dir}/faults.txt">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   107
            <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   108
                dbPath: ${test.temp.dir}/metadata_db
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   109
                ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   110
            </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   111
        </fmpp>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   112
        <loadfile property="componentlogEntry"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   113
              srcFile="${test.temp.dir}/faults.txt"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   114
        <au:assertMatches string="${componentlogEntry}" pattern="sf/app/organizer/group:error:2" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   115
                     casesensitive="false"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   116
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   117
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   118
    <target name="test-categorization-component-check-after">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   119
        <echo message="component error check for categorization" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   120
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   121
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   122
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   123
                    <include  name="categorization_error_after_compile.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   124
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   125
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   126
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   127
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   128
        <fmpp sourceFile="${project.dir}/../data/templates/component_categorization.txt.ftl"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   129
                     outputfile="${test.temp.dir}/faults.txt">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   130
            <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   131
                dbPath: ${test.temp.dir}/metadata_db
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   132
                ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   133
            </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   134
        </fmpp>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   135
        <loadfile property="componentlogEntry"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   136
              srcFile="${test.temp.dir}/faults.txt"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   137
        <au:assertMatches string="${componentlogEntry}" pattern="sf/app/organizer/group:error:2" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   138
                         casesensitive="false"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   139
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   140
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   141
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   142
    <target name="test-categorization-nocleanlog-failed-empty-recipe">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   143
        <echo message="test-categorization-nocleanlog-failed-empty-recipe" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   144
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   145
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   146
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   147
                    <include  name="categorization_failed_empty_recipe.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   148
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   149
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   150
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   151
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   152
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/categorization_failed_empty_recipe.log" database="${test.temp.dir}/metadata_db" property="empty_nocleanlog_errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   153
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   154
            <equals arg1="${empty_nocleanlog_errors}" arg2="2"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   155
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   156
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   157
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   158
    <target name="test-categorization-nocleanlog-failed-error-in-recipe">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   159
        <echo message="test-categorization-nocleanlog-failed-error-in-recipe" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   160
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   161
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   162
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   163
                    <include  name="categorization_failed_error_in_recipe.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   164
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   165
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   166
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   167
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   168
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/categorization_failed_error_in_recipe.log" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   169
            database="${test.temp.dir}/metadata_db" property="empty_nocleanlog_errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   170
        <echo>empty_nocleanlog_errors: ${empty_nocleanlog_errors}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   171
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   172
            <equals arg1="${empty_nocleanlog_errors}" arg2="2"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   173
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   174
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   175
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   176
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   177
    <!-- To verify some lengthy text for recipe tag from 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   178
    sbs metadata input.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   179
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   180
    <target name="test-recipe-lengthy-text">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   181
        <echo message="test-recipe-lengthy-text" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   182
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   183
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   184
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   185
                    <include  name="receipe_lengthy_warn.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   186
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   187
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   188
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   189
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   190
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   191
            <available type="dir" file="${test.temp.dir}/metadata_db" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   192
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   193
        <hlm:metadataCountSeverity severity="warning" log="${project.dir}/../data/sbs/receipe_lengthy_warn.log" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   194
            database="${test.temp.dir}/metadata_db" property="warnings"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   195
        <echo>warnings: ${warnings}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   196
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   197
            <equals arg1="${warnings}" arg2="1"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   198
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   199
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   200
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   201
    <!-- To verify some lengthy member are not failing the recording
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   202
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   203
    <target name="test-recipe-lengthy-member">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   204
        <echo message="test-recipe-lengthy-member" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   205
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   206
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   207
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   208
                    <include  name="receipe_lengthy_whatlog.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   209
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   210
                <metadatafilterset refid="error.filterset" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   211
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   212
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   213
        <au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   214
            <available type="dir" file="${test.temp.dir}/metadata_db" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   215
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   216
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   217
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   218
    <target name="test-metadatacount-no-error-with-missing-files-path-with-backslashes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   219
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   220
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   221
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   222
                    <include  name="metadatacount_missing_files.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   223
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   224
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   225
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   226
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   227
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   228
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   229
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   230
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   231
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/metadatacount_missing_files.log" database="${test.temp.dir}/metadata_db" property="errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   232
        <echo>errors: ${errors}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   233
        <au:assertTrue message="We must have 5 missing files counted as error.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   234
            <equals arg1="${errors}" arg2="5"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   235
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   236
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   237
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   238
    <target name="test-metadatacount-no-error-with-missing-files">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   239
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   240
            <hlm:sbsmetadatainput >
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   241
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   242
                    <include  name="metadatacount_missing_files.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   243
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   244
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   245
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   246
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   247
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   248
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   249
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   250
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   251
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/metadatacount_missing_files.log" database="${test.temp.dir}/metadata_db" property="errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   252
        <echo>errors: ${errors}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   253
        <au:assertTrue message="We must have 5 missing files counted as error.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   254
            <equals arg1="${errors}" arg2="5"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   255
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   256
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   257
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   258
    <target name="test-metadatacount-error-with-missing-files">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   259
    	<echo>test-metadatacount-error-with-missing-files</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   260
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   261
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   262
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   263
                    <include name="metadatacount_error_and_missing_files.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   264
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   265
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   266
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   267
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   268
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   269
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   270
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   271
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   272
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/metadatacount_error_and_missing_files.log" database="${test.temp.dir}/metadata_db" property="errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   273
        <echo>error: ${errors}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   274
    	<au:assertTrue message="We must have 6 missing files counted as error.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   275
            <equals arg1="${errors}" arg2="6"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   276
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   277
    </target>        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   278
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   279
    <target name="test-count-error-without-missing-files">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   280
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   281
            <hlm:sbsmetadatainput checkMissing="false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   282
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   283
                    <include  name="metadatacount_error_and_missing_files.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   284
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   285
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   286
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   287
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   288
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   289
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   290
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   291
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   292
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/metadatacount_error_and_missing_files.log"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   293
            database="${test.temp.dir}/metadata_db" property="errors"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   294
            />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   295
        <au:assertTrue message="We must have 1 missing files counted as error.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   296
            <equals arg1="${errors}" arg2="1"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   297
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   298
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   299
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   300
    <target name="test-whatlog-parsing">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   301
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   302
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   303
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   304
                    <include name="build_whatlog.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   305
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   306
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   307
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   308
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   309
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   310
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   311
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   312
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   313
        <fmpp sourceFile="${project.dir}/../data/sbs/whatlog_result.ini.ftl"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   314
                     outputfile="${test.temp.dir}/whatlog_result.ini">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   315
            <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   316
                dbPath: ${test.temp.dir}/metadata_db
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   317
                ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   318
            </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   319
        </fmpp>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   320
        <property file="${test.temp.dir}/whatlog_result.ini" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   321
        <au:assertTrue message="Invalid number of logs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   322
            <equals arg1="${number.of.logs}" arg2="1" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   323
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   324
        <au:assertTrue message="Invalid number of whatlog entries">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   325
            <equals arg1="${number.of.whatlog.entries}" arg2="5" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   326
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   327
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   328
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   329
    <target name="test-count-error-with-invalid-xml-fail-on-invalid-xml-false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   330
        <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   331
            <hlm:sbsmetadatainput checkMissing="false" failOnInvalidXml="false">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   332
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   333
                    <include  name="invalid_xml_log_format.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   334
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   335
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   336
                    <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   337
                    <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   338
                    <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   339
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   340
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   341
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   342
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/invalid_xml_log_format.log"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   343
            database="${test.temp.dir}/metadata_db" property="errors"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   344
            />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   345
        <au:assertTrue message="We must have 1 error in the log because of invalid xml format.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   346
            <equals arg1="${errors}" arg2="1"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   347
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   348
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   349
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   350
    <target name="test-count-error-with-invalid-xml-fail-on-invalid-xml-true">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   351
        <au:expectfailure expectedMessage="The element type &quot;error&quot; must be terminated by the matching end-tag &quot;&lt;/error&gt;&quot;">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   352
            <hlm:metadatarecord database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   353
                <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   354
                    <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   355
                        <include  name="invalid_xml_log_format.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   356
                    </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   357
                    <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   358
                        <metadatafilter severity="INFO" regex="^INFO:" description="info" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   359
                        <metadatafilter severity="ERROR" regex="^ERROR:" description="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   360
                        <metadatafilter severity="WARNING" regex=".*warning C4503:.*" description="warning" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   361
                    </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   362
                </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   363
            </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   364
        </au:expectfailure>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   365
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/invalid_xml_log_format.log"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   366
            database="${test.temp.dir}/metadata_db" property="errors"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   367
            />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   368
        <au:assertTrue message="We must have 1 error in the log because of invalid xml format.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   369
            <equals arg1="${errors}" arg2="1"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   370
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   371
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   372
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   373
    <target name="test-emake-errors-in-sbs-compile">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   374
        <hlm:metadatarecord  database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   375
            <hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   376
                <fileset dir="${project.dir}/../data/sbs">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   377
                    <include  name="sbs_compile_emake_errors.log"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   378
                </fileset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   379
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   380
                    <metadatafilter priority="error" regex="^ERROR\s+EC\d+:.*$" description="To capture emake errors" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   381
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   382
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   383
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   384
        <hlm:metadataCountSeverity severity="error" log="${project.dir}/../data/sbs/sbs_compile_emake_errors.log"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   385
            database="${test.temp.dir}/metadata_db" property="errors"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   386
        <au:assertTrue message="We must have 5 emake errors in the log.">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   387
            <equals arg1="${errors}" arg2="5"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   388
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   389
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   390
	
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   391
	
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   392
    <target name="test-unit-linkage">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   393
    	<property name="epocroot" location="../" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   394
    	<copy file="${project.dir}/../data/sbs/unit_categorization_compile.log" tofile="${test.temp.dir}/unit_categorization_compile.log">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   395
    	    <filterchain>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   396
    		    <expandproperties/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   397
    	    </filterchain>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   398
    	</copy>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   399
        <hlm:metadatarecord  database="${test.temp.dir}/metadata_db">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   400
            <hlm:sysdefmetadatainput file="../data/sbs/sysdef3.xml" epocroot="${epocroot}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   401
            <hlm:sbsmetadatainput epocroot="../">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   402
                <fileset file="${test.temp.dir}/unit_categorization_compile.log" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   403
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   404
                    <metadatafilter priority="error" regex="^ERROR:.*" description="To capture emake errors" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   405
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   406
            </hlm:sbsmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   407
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   408
        <fmpp sourceFile="../data/sbs/sysdef_data.ini.ftl"
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   409
                     outputfile="${test.temp.dir}/sysdef_data.ini">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   410
            <data expandProperties="yes">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   411
                dbPath: ${test.temp.dir}/metadata_db
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   412
                ant: antProperties()
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   413
            </data>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   414
        </fmpp>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   415
        <property file="${test.temp.dir}/sysdef_data.ini" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   416
        <echo>component.count: ${component.count}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   417
        <echo>component.0.unit.id: ${component.0.unit.id}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   418
        <echo>component.0.unit.location: ${component.0.unit.location}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   419
        <echo>component.1.unit.id: ${component.1.unit.id}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   420
        <echo>component.1.unit.location: ${component.1.unit.location}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   421
        <au:assertTrue message="Check the first component do not links to any unit (uncategorized)">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   422
            <equals arg1="${component.0.unit.id}" arg2="0" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   423
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   424
        <au:assertTrue message="Check the first component do not links to any unit (uncategorized)">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   425
            <equals arg1="${component.0.unit.location}" arg2="" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   426
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   427
        <au:assertTrue message="Check the second component links to a unit">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   428
            <equals arg1="${component.1.unit.location}" arg2="sf/mw/helloworldapi/group" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   429
        </au:assertTrue>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   430
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   431
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents:
diff changeset
   432
</project>