buildframework/helium/tools/compile/sbs/sbs.ant.xml
author Shabe Razvi <shaber@symbian.org>
Tue, 13 Jul 2010 18:31:50 +0100
branchhelium-7.0.x
changeset 614 e08bbc2db635
parent 601 7c5cbd40d331
permissions -rw-r--r--
Implement enhancement Bug 3222 - Enable Helium to set diamonds status other than "succeeded" or "failed"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     2
<!-- 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     3
============================================================================ 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     4
Name        : sbs.ant.xml 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     5
Part of     : Helium 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     6
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     8
All rights reserved.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
     9
This component and the accompanying materials are made available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    11
which accompanies this distribution, and is available
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    13
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    14
Initial Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    16
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    17
Contributors:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    18
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    19
Description:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    20
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    21
============================================================================
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    22
-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    23
<project name="compile.sbs" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    Executes compilation of a System Model of System Definition file using Symbian SBS (Raptor) tools. 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
    Should not be called directly but through compile-main by setting ${build.system.sbs} property.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
    Example:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    30
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    hlm -Dsysdef.configurations.list=ALL -Dbuild.system=sbs compile-main
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
    hlm "-Dsysdef.configurations.list=REALLYCLEAN,ALL" -Dbuild.system=sbs compile-main
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    33
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    34
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    35
    <!-- Executes compilation  of a System Model of System Definition file using Symbian SBS (Raptor) tools. 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    36
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    37
    Should not be called directly but through compile-main by setting ${build.system.sbs} property.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    38
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    39
    Example: 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    40
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    41
    hlm -Dsysdef.configurations.list=ALL -Dbuild.system=sbs compile-main
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    42
    hlm "-Dsysdef.configurations.list=REALLYCLEAN,ALL" -Dbuild.system=sbs compile-main
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    43
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    44
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    45
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    46
    <property name="skip.sbs.layer.generation" value="false" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    47
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    48
    <!-- This target filters the canonical system definition file compare to the "raptor_${sysdef.configuration}" filter. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    49
    <macrodef name="generate-layers" uri="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    50
        <sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    51
            <echo message="canno-file:${canonical.sysdef.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
            <echo message="raptor-filters:raptor_${sysdef.configuration}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    53
            <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    54
                <istrue value="${skip.sbs.layer.generation}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    55
                <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    56
                    <copy file="${canonical.sysdef.file}" tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    57
                </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    58
                <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    59
                    <hlm:compileGenxmlFilterMacro input="${canonical.sysdef.file}" filter="raptor_${sysdef.configuration}"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    60
                        output="${build.output.dir}/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    61
                </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    62
            </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    63
            <copy file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    64
                    tofile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    65
                <filterchain>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    66
                    <linecontainsregexp negate="true">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    67
                        <regexp pattern="^\s*$"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    68
                    </linecontainsregexp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    69
                </filterchain>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    70
            </copy>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    71
            <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    72
        </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    73
    </macrodef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    74
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    75
    <!-- SBS build with gmake as engine type. Default is using sbs macro, to use old implementation to
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    76
    use using exec task, then sbs.using.exec needs to be set. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    77
    <target name="compile-sbs" description="This is the main build that gets built for ARMV5 and WINSCW platforms">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    78
        <!-- only temporary once config file option starts to work, then no 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    79
        need to copy the plugin file -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    80
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    81
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    82
            <or>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    83
                <equals arg1="${build.system}" arg2="sbs" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    84
                <equals arg1="${build.system}" arg2="sbs-ec" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    85
            </or>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    86
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    87
                <echo message="Copying helium filter plugin to sbs home" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    88
                <copy file="${helium.dir}/tools/common/python/scripts/filter_metadatalog.py" todir="${env.SBS_HOME}/python/plugins/" failonerror="true" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    89
                <copy file="${helium.dir}/tools/common/python/scripts/sbsscanlogmetadata.py" todir="${env.SBS_HOME}/python/plugins/" failonerror="true" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    90
                <echo message="sbs.patternset: ${sbs.patternset}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    91
                <hlm:generate-layers />
601
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    92
                <var name="sbs.internal.inputs.list" value="" unset="true"/>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    93
                <if>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    94
                    <istrue value="${schema.new}" />
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    95
                    <then>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    96
                        <var name="sbs.internal.inputs.list" value="${sbs.inputs.list}"/>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    97
                    </then>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    98
                    <else>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
    99
                        <var name="sbs.internal.inputs.list" value="" unset="true"/>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
   100
                        <hlm:getsbsinputs config="sbs.${sysdef.configuration}" outputProperty="sbs.internal.inputs.list"/>  
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
   101
                        <echo message="Inputs: ${sbs.internal.inputs.list}"/>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
   102
                    </else>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
   103
                </if>
7c5cbd40d331 Bug 2176 - Helium 7.0 needs patching to work with FBF
Shabe Razvi <shaber@symbian.org>
parents: 593
diff changeset
   104
                 <for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   105
                    <sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   106
                        <echo message="building raptor input: @{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   107
                        <hlm:getVariableValue name="--logfile" property="sbs.log.file">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   108
                            <hlm:sbsinput refid="@{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   109
                        </hlm:getVariableValue>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   110
                        <!-- run arm license checking / setting arm version only for arm config -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   111
                        <hlm:getVariableValue name="-c" property="compilevalue.var" failOnerror="false">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   112
                            <hlm:sbsinput refid="@{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   113
                        </hlm:getVariableValue>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   114
                        <echo message="config parameter -c : ${compilevalue.var}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   115
                        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   116
                            <and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   117
                                <isset property="compilevalue.var"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   118
                                <matches string="${compilevalue.var}" pattern="arm.*"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   119
                            </and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   120
                            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
                                <runtarget target="set-arm-version"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   122
                            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   123
                        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   124
                        <var name="sbs.clean.log" value="${sbs.log.file}.clean.log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   125
                        <!-- Generate the filtered layers -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   126
                        <hlm:sbstask sbsinput="@{sbs.input}" sysdefFile="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   127
                            layerPatternSetRef="${sbs.patternset}" errorOutput="${sbs.log.file}.sbs_error.log" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   128
                            workingDir="${build.drive}/" failOnError="false" outputLog="${sbs.log.file}" cleanLog = "${sbs.clean.log}"
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   129
                             statsLog="${sbs.log.file}.info.xml" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   130
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   131
                        <!-- Check build for missing files -->
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   132
                        <exec osfamily="windows" executable="cmd" dir="${build.drive}/" input="${sbs.log.file}" output="${sbs.log.file}.check.log" failonerror="false">
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   133
                            <arg value="/c" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   134
                            <arg value="sbs_filter.bat" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   135
                            <arg value="--filters=FilterCheckComp" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   136
                        </exec>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   137
                        <exec osfamily="unix" executable="sbs_filter" dir="${build.drive}/" input="${sbs.log.file}" output="${sbs.log.file}.check.log" failonerror="false">
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   138
                            <arg value="--filters=FilterCheckComp" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   139
                        </exec>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   140
                        <hlm:assertFileExists file="${sbs.log.file}.check.log" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   141
                        
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   142
                        <!-- Push info to the database and generate scanlog. --> 
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   143
                        <echo message="sbs.log.file: ${sbs.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   144
                        <hlm:sbsProcessOutputMacro sbs.log.file="${sbs.log.file}"
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   145
                            sbs.clean.log.file="${sbs.clean.log}"  sbs.stats.file="${sbs.log.file}.info.xml"
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   146
                            sbs.ant.output.file="${sbs.log.file}" sbs.error.output.file="${sbs.log.file}.sbs_error.log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   147
                    </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   148
                </for>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   149
                <hlm:assertFileExists file="${sbs.log.file}.sbs_error.log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   150
                <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.info.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   151
                <hlm:assertFileExists file="${sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   152
                <hlm:assertFileExists file="${sbs.clean.log}"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   153
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   154
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   155
    </target>
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   156
    
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   157
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   158
    <macrodef name="sbsProcessOutputMacro" uri="http://www.nokia.com/helium">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   159
        <attribute name="sbs.clean.log.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   160
        <attribute name="sbs.log.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   161
        <attribute name="sbs.stats.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   162
        <attribute name="sbs.error.output.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   163
        <attribute name="sbs.ant.output.file" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   164
        <sequential>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   165
            <var name="sbs.scan2.template" value="scan2.html.ftl" />
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   166
            <var name="base.sbs.log" value="" unset="true"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   167
            <basename property="base.sbs.log" file="@{sbs.log.file}" suffix=".log"/>
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   168
            <echo message="base.sbs.log: ${base.sbs.log}" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   169
            
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   170
            <!-- Push check log into the database -->
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   171
            <hlm:metadatarecord database="${metadata.dbfile}">
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   172
                <hlm:textmetadatainput>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   173
                    <fileset casesensitive="false" file="@{sbs.log.file}.check.log"/>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   174
                    <metadatafilterset refid="filterset.sbs" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   175
                </hlm:textmetadatainput>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   176
            </hlm:metadatarecord>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   177
            <delete file="${build.log.dir}/${base.sbs.log}.check.scan2.html" failonerror="false" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   178
            <exec executable="perl" dir="${build.drive}/" failonerror="false">
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   179
                <arg value="${build.drive}/epoc32/tools/htmlscanlog.pl" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   180
                <arg value="-v" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   181
                <arg value="-v" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   182
                <arg value="-l" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   183
                <arg file="@{sbs.log.file}.check.log" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   184
                <arg value="-o" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   185
                <arg file="${build.log.dir}/${base.sbs.log}.check.scan2.html" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   186
            </exec>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   187
            <hlm:assertFileExists file="${build.log.dir}/${base.sbs.log}.check.scan2.html" />
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   188
            
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   189
            <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   190
                <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   191
                    <fileset casesensitive="false" file="@{sbs.error.output.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   192
                    <metadatafilterset refid="filterset.sbs" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   193
                </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   194
            </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   195
            <basename property="base.sbs.ant.output.log" file="@{sbs.ant.output.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   196
            <hlm:signalMacro logfile="@{sbs.error.output.file}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   197
                signal.input="raptorErrorSignalInput" phase="compile"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   198
            <!-- update the resultes to database -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   199
            <echo message="Metadata enabled, storing build status in database" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   200
            <echo message="sbs log file :@{sbs.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   201
            <echo message="sbs.clean.log.file :@{sbs.clean.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   202
            <trycatch property="hlm-sbs.parser.thrown">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   203
                <try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   204
                    <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   205
                        <hlm:sbsmetadatainput cleanLogFile="@{sbs.clean.log.file}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   206
                            <fileset casesensitive="false" file="@{sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   207
                            <metadatafilterset refid="filterset.sbs" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   208
                        </hlm:sbsmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   209
                    </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   210
                </try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   211
                <catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   212
                    <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   213
                        <istrue value="${skip.sbs.parser.exception}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   214
                        <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   215
                            <var name="sbs.scan2.template" value="scan2_text.html.ftl" />
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   216
                            <hlm:metadatadelete database="${metadata.dbfile}">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   217
                                <fileset casesensitive="false" file="@{sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   218
                            </hlm:metadatadelete>
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   219
                            <hlm:metadatarecord database="${metadata.dbfile}" >
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   220
                                <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   221
                                    <fileset casesensitive="false" file="@{sbs.log.file}"/>
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   222
                                    <metadatafilterset refid="filterset.sbs" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   223
                                </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   224
                            </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   225
                        </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   226
                        <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   227
                            <fail message="failed during raptor log parsing: might be due to invalid xml output from raptor" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   228
                        </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   229
                    </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   230
                </catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   231
            </trycatch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   232
            <fmpp sourceFile="${helium.dir}/tools/common/templates/log/${sbs.scan2.template}"
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   233
                         outputfile="${build.log.dir}/${base.sbs.log}.scan2.html">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   234
                <freemarkerLinks expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   235
                    macro: ${helium.dir}/tools/common/templates/macro
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   236
                </freemarkerLinks>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   237
                <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   238
                    dbPath: ${metadata.dbfile}
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   239
                    doc: xml(@{sbs.stats.file})
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   240
                    ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   241
                </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   242
            </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   243
            <echo message="generating signal" />
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   244
            <hlm:assertFileExists file="${build.log.dir}/${base.sbs.log}.scan2.html"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   245
            <hlm:calculateErrorsFromLog logfile="@{sbs.log.file}" />
593
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   246
            <echo message="sbs.log.file: @{sbs.log.file}"/>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   247
            <hlm:compileLogSignalMacro compile.summary.file="@{sbs.log.file}" 
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   248
                error.limit="${build.errors.limit}" phase="compile"/>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   249
            <echo message="sbs.error.output.file: @{sbs.error.output.file}"/>
4367a1b2db65 helium_7.0.x-r16015
wbernard
parents: 179
diff changeset
   250
            <hlm:compileLogSignalMacro compile.summary.file="@{sbs.error.output.file}" 
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   251
                error.limit="${build.errors.limit}" phase="compile"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   252
            <!-- Blocks packaging configuration generation. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   253
            <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   254
                <istrue value="${blocks.enabled}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   255
                <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   256
                    <mkdir dir="${blocks.config.dir}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   257
                    <exec executable="python">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   258
                        <arg value="-m"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   259
                        <arg value="packager.cli"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   260
                        <arg value="--epocroot=${build.drive}/" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   261
                        <arg value="--config=${blocks.config.dir}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   262
                        <arg value="--datasource=sbs" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   263
                        <arg value="-Dsbslog=${sbs.log.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   264
                        <arg value="-Dsysdef=${canonical.sysdef.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   265
                        <arg value="-Dthreads=20" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   266
                        <arg value="--updateData" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   267
                    </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   268
                </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   269
            </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
        </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   271
    </macrodef>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   272
</project>