buildframework/helium/tools/logging/test/test_summary_log.ant.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 588 c7c26511138f
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" 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_summary_log.ant.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium 
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_summary_log" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
        Logging testing targets
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    </description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
    <property environment="env"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
    <property name="helium.dir" location="../../.." />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
    <property name="test.temp.dir" location="${helium.dir}/build/antunit/summary" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
    <property name="build.drive" location="${test.temp.dir}" />
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    32
    <import file="../../../build.xml"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
    <target name="setUp">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
        <delete dir="${test.temp.dir}" failonerror="false" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
        <mkdir dir="${test.temp.dir}" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
    <target name="tearDown">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
        <!-- delete dir="${test.temp.dir}" failonerror="false" / -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
                
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    <target name="test-render-log-summary">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
        <condition property="sbs.log" value="${helium.dir}/tests/data/summary_log/sbs_linux_compile.log" else="${helium.dir}/tests/data/summary_log/sbs_compile.log">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
            <os family="unix" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
        </condition>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
        <hlm:metadatarecord database="${metadata.dbfile}">
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
    48
            <hlm:sbsmetadatainput checkMissing="true">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
                <fileset casesensitive="false" file="${sbs.log}"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
                <metadatafilterset refid="filterset.sbs" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
            </hlm:sbsmetadatainput>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
            <hlm:antmetadatainput>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
                <fileset casesensitive="false" file="${helium.dir}/tests/data/summary_log/prep_work_area.log"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
                <metadatafilterset refid="filterset.common" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
            </hlm:antmetadatainput>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
        </hlm:metadatarecord>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
        <copy file="${helium.dir}/tests/data/summary_log/build_info.log.xml" tofile="${build.log.dir}/${build.id}_info.log.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
        <echo>${build.log.dir}/${build.id}_summary.html</echo>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
        <runtarget target="render-log-summary" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    61
        
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
        <au:assertFileExists file="${build.log.dir}/${build.id}_summary.html" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
        <loadfile property="summarylog" srcFile="${build.log.dir}/${build.id}_summary.html" /> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
        <au:assertTrue message="Check &quot;ERROR: Some fake error&quot;"> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
            <contains string="${summarylog}" substring="ERROR: Some fake error" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
        </au:assertTrue> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
        <au:assertTrue message="Check for 24 errors"> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
            <contains string="${summarylog}" substring="&gt;24 errors&lt;" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
        </au:assertTrue> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
        <au:assertTrue message="Check for 8 errors"> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
            <contains string="${summarylog}" substring="&gt;8 errors&lt;" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
        </au:assertTrue> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
        <au:assertTrue message="Check for 16 errors"> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
            <contains string="${summarylog}" substring="&gt;16 errors&lt;" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
        </au:assertTrue> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
        <au:assertTrue message="Check for 15 errors"> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
            <contains string="${summarylog}" substring="&gt;15 errors&lt;" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78
        </au:assertTrue> 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    79
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    80
</project>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    81