buildframework/helium/tools/compile/sbs/sbs.ant.xml
author wbernard
Wed, 23 Jun 2010 16:25:55 +0300
branchhelium-7.0.x
changeset 592 3215c239276a
parent 179 d8ac696cc51f
child 217 0f5e3a7fb6af
child 593 4367a1b2db65
permissions -rw-r--r--
Creating helium-7.0.x branch
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 />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    92
                <var name="sbs.inputs.list" value="" unset="true"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    93
                <hlm:getsbsinputs config="sbs.${sysdef.configuration}" outputProperty="sbs.inputs.list"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    94
                <for list="${sbs.inputs.list}" delimiter="," param="sbs.input">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    95
                    <sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    96
                        <echo message="building raptor input: @{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    97
                        <hlm:getVariableValue name="--logfile" property="sbs.log.file">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    98
                            <hlm:sbsinput refid="@{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    99
                        </hlm:getVariableValue>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   100
                        <!-- run arm license checking / setting arm version only for arm config -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   101
                        <hlm:getVariableValue name="-c" property="compilevalue.var" failOnerror="false">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   102
                            <hlm:sbsinput refid="@{sbs.input}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   103
                        </hlm:getVariableValue>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   104
                        <echo message="config parameter -c : ${compilevalue.var}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   105
                        <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   106
                            <and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   107
                                <isset property="compilevalue.var"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   108
                                <matches string="${compilevalue.var}" pattern="arm.*"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   109
                            </and>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   110
                            <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   111
                                <runtarget target="set-arm-version"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   112
                            </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   113
                        </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   114
                        <var name="sbs.clean.log" value="${sbs.log.file}.clean.log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   115
                        <!-- Generate the filtered layers -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   116
                        <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
   117
                            layerPatternSetRef="${sbs.patternset}" errorOutput="${sbs.log.file}.sbs_error.log" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   118
                            workingDir="${build.drive}/" failOnError="false" outputLog="${sbs.log.file}" cleanLog = "${sbs.clean.log}"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   119
                             statsLog="${compile.log.dir}/${build.id}_${sysdef.configuration}.info.xml" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   120
                        <!-- run arm license checking / setting arm version only for arm config --> 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
                        <echo message="sbs.log.file: ${sbs.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   122
                        <hlm:sbsProcessOutputMacro sbs.log.file="${sbs.log.file}"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   123
                            sbs.clean.log.file="${sbs.clean.log}"  sbs.stats.file="${compile.log.dir}/${build.id}_${sysdef.configuration}.info.xml"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   124
                            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
   125
                    </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   126
                </for>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   127
                <hlm:assertFileExists file="${sbs.log.file}.sbs_error.log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   128
                <hlm:assertFileExists file="${compile.log.dir}/${build.id}_${sysdef.configuration}.info.xml"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   129
                <hlm:assertFileExists file="${sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   130
                <hlm:assertFileExists file="${sbs.clean.log}"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   131
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   132
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   133
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   134
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   135
    <macrodef name="sbsProcessOutputMacro" uri="http://www.nokia.com/helium">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   136
        <attribute name="sbs.clean.log.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   137
        <attribute name="sbs.log.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   138
        <attribute name="sbs.stats.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   139
        <attribute name="sbs.error.output.file" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   140
        <attribute name="sbs.ant.output.file" />
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   141
        <sequential>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   142
            <var name="sbs.scan2.template" value="scan2.html.ftl" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   143
            <basename property="base.sbs.log" file="@{sbs.log.file}" suffix=".log"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   144
            <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   145
                <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   146
                    <fileset casesensitive="false" file="@{sbs.error.output.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   147
                    <metadatafilterset refid="filterset.sbs" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   148
                </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   149
            </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   150
            <basename property="base.sbs.ant.output.log" file="@{sbs.ant.output.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   151
            <hlm:signalMacro logfile="@{sbs.error.output.file}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   152
                signal.input="raptorErrorSignalInput" phase="compile"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   153
            <!-- update the resultes to database -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   154
            <echo message="Metadata enabled, storing build status in database" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   155
            <echo message="sbs log file :@{sbs.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   156
            <echo message="sbs.clean.log.file :@{sbs.clean.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   157
            <trycatch property="hlm-sbs.parser.thrown">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   158
                <try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   159
                    <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   160
                        <hlm:sbsmetadatainput cleanLogFile="@{sbs.clean.log.file}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   161
                            <fileset casesensitive="false" file="@{sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   162
                            <metadatafilterset refid="filterset.sbs" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   163
                        </hlm:sbsmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   164
                    </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   165
                </try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   166
                <catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   167
                    <if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   168
                        <istrue value="${skip.sbs.parser.exception}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   169
                        <then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   170
                            <var name="sbs.scan2.template" value="scan2_text.html.ftl" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   171
                            <hlm:metadatadelete database="${metadata-read-db}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   172
                                <fileset casesensitive="false" file="@{sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   173
                            </hlm:metadatadelete>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   174
                            <hlm:metadatarecord database="${metadata-read-db}" >
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   175
                                <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   176
                                    <fileset casesensitive="false" file="@{sbs.log.file}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   177
                                </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   178
                            </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   179
                        </then>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   180
                        <else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   181
                            <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
   182
                        </else>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   183
                    </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   184
                </catch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   185
            </trycatch>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   186
            <fmpp sourceFile="${helium.dir}/tools/common/templates/log/${sbs.scan2.template}"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   187
                         outputfile="@{sbs.log.file}.scan2.html">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   188
                <freemarkerLinks expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   189
                    macro: ${helium.dir}/tools/common/templates/macro
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   190
                </freemarkerLinks>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   191
                <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   192
                    dbPath: ${metadata.dbfile}
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   193
                    doc: xml(@{sbs.stats.file})
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   194
                    ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   195
                </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   196
            </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   197
            <echo message="generating signal" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   198
            <hlm:assertFileExists file="@{sbs.log.file}.scan2.html"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   199
            <hlm:calculateErrorsFromLog logfile="@{sbs.log.file}" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   200
            <hlm:compileLogSignalMacro compile.summary.file="${base.sbs.log}" 
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   201
                error.limit="${build.errors.limit}" phase="compile"/>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   202
            <!-- Blocks packaging configuration generation. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   203
            <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   204
                <istrue value="${blocks.enabled}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   205
                <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   206
                    <mkdir dir="${blocks.config.dir}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   207
                    <exec executable="python">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   208
                        <arg value="-m"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   209
                        <arg value="packager.cli"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   210
                        <arg value="--epocroot=${build.drive}/" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   211
                        <arg value="--config=${blocks.config.dir}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   212
                        <arg value="--datasource=sbs" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   213
                        <arg value="-Dsbslog=${sbs.log.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   214
                        <arg value="-Dsysdef=${canonical.sysdef.file}" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   215
                        <arg value="-Dthreads=20" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   216
                        <arg value="--updateData" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   217
                    </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   218
                </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   219
            </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   220
        </sequential>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   221
    </macrodef>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   222
</project>