buildframework/helium/tools/preparation/ido-prep.ant.xml
author timothy.murphy@nokia.com
Fri, 30 Apr 2010 16:34:01 +0100
branchfix
changeset 513 a9260a413076
parent 217 0f5e3a7fb6af
child 587 85df38eb4012
permissions -rw-r--r--
fix releasenotes
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        : ido-prep.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
-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    23
<!--* @package preparation -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    24
<project name="ido-prep" xmlns:hlm="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    25
    <description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    26
        IDO related targets.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    27
         * Build area preparation
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    28
         * Codescanner integration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    29
         * Cenrep generation (old way)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    30
         * IBY export (old way)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    31
    </description>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    32
        
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    33
    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    35
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    36
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    37
    <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    38
    <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA for quality targets.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    39
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    40
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    41
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    42
    <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    43
    <!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    44
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    45
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    46
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    47
    <property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    48
    <!-- Path to the cenrep root. Default value is "${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    49
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    50
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    51
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    52
    <property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    53
    <!-- Path to the cenrep target directory. Default value is "${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    54
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    55
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    57
    <property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"  />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    58
    <!-- Defines the location of Codescanner output.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
    -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    61
    <property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    62
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    63
    <!-- Internal target that generates the '''ado.mapping.file'''.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    64
     It is a INI file that contains ADO location as a key and target location as value.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    65
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    66
    <target name="ido-create-ado-mapping">        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    67
        <mkdir dir="${build.output.dir}/build"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    68
        <mkdir dir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    69
        <tempfile property="prep.dynamic.sysdef.config" suffix=".txt" deleteonexit="false" destdir="${temp.build.dir}"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    70
        <trycatch property="error.message">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    71
            <try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    72
                <hlm:referenceToFileMacro refid="system.definition.files" output="${prep.dynamic.sysdef.config}"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    73
            </try>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    74
            <catch>       
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    75
                <propertyregex property="message" input="${error.message}"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    76
                  regexp=":(.*)$"
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    77
                  select="\1" casesensitive="false" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    78
                <fail message="Error: ${message}" />     
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    79
            </catch>               
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    80
        </trycatch>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    81
        <trycatch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    82
            <try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    83
                <pathconvert pathsep="," property="ado.quality.dirs.path">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    84
                    <dirset refid="ado.quality.dirs"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    85
                </pathconvert>                              
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    86
            </try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    87
        </trycatch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    88
        <script language="jython" setbeans="false">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    89
import idoprep
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    90
idoprep.create_ado_mapping(project.getProperty(r"prep.dynamic.sysdef.config"), project.getProperty(r"ado.mapping.file"), project.getProperty(r"ado.quality.mapping.file"), project.getProperty(r"build.drive"), project.getProperty("ado.quality.dirs.path"))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    91
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    92
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
    93
    
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    94
    <!-- Target to generate cenreps using cone tool -->
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    95
    <target name="ido-gen-cenrep">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    96
        <mkdir dir="${post.log.dir}" />
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    97
        <for list="${sysdef.configurations.list}" delimiter="," param="sysdef.config">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
    98
            <sequential>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    99
                <var name="confml.log.file" unset="true"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   100
                <if>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   101
                    <or>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   102
                        <equals arg1="${build.system}" arg2="sbs" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   103
                        <equals arg1="${build.system}" arg2="sbs-ec" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   104
                    </or>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   105
                    <then>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   106
                        <hlm:getsbsinputs config="sbs.@{sysdef.config}" outputProperty="sbs.internal.inputs.list"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   107
                        <for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   108
                            <sequential>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   109
                                <hlm:getVariableValue name="--logfile" property="sbs.log.file">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   110
                                    <hlm:sbsinput refid="@{sbs.input}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   111
                                </hlm:getVariableValue>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   112
                                <property name="confml.log.file" value="${sbs.log.file}"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   113
                            </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   114
                        </for>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   115
                    </then>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   116
                    <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   117
                        <property name="confml.log.file" value="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   118
                    </else>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   119
                </if>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   120
            </sequential>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   121
        </for>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   122
        <echo>confml.log.file = ${confml.log.file}</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   123
        <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   124
            <available file="${confml.log.file}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   125
            <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   126
                <hlm:grepMacro filename="${confml.log.file}" regexp="([^\\/.]*?)\.confml" output="confml.file.list"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   127
                <for list="${confml.file.list}" delimiter="," param="confml.file">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   128
                    <sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   129
                        <var name="crml.regexp" unset="true"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   130
                        <echo>confml.file = @{confml.file}</echo>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   131
                        <hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   132
                            <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   133
                            <arg name="path" value="${build.drive}/epoc32/tools/" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   134
                            <arg name="-v" value="5" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   135
                            <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   136
                            <arg name="-o" value="${build.drive}\epoc32\release\winscw\urel\z" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   137
                            <arg name="-c" value="root.confml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   138
                            <arg name="-i" value="@{confml.file}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   139
                        </hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   140
                        <hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   141
                            <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   142
                            <arg name="path" value="${build.drive}/epoc32/tools/" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   143
                            <arg name="-v" value="5" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   144
                            <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   145
                            <arg name="-o" value="${build.drive}\epoc32\release\winscw\udeb\z" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   146
                            <arg name="-c" value="root.confml" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   147
                            <arg name="-i" value="@{confml.file}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   148
                        </hlm:conEToolMacro>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   149
                    </sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   150
                </for>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   151
            </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   152
        </if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   153
        <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   154
            <filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   155
                <linecontainsregexp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   156
                    <regexp pattern="^\s*Generating file"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   157
                </linecontainsregexp>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   158
            </filterchain>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   159
        </copy>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   160
        <hlm:metadatarecord database="${metadata.dbfile}">
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   161
            <hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   162
                <fileset casesensitive="false" file="${post.log.dir}/${build.id}_cenrep.cone.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   163
                <metadatafilterset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   164
                    <metadatafilter priority="error" regex="^ERROR\s+:.*" description="cone error" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   165
                    <metadatafilter priority="warning" regex="^WARNING\s+:.*" description="cone warnings" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   166
                    <metadatafilter priority="info" regex="^INFO\s+:.*" description="cone info" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   167
                </metadatafilterset>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   168
            </hlm:textmetadatainput>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   169
        </hlm:metadatarecord>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   170
        <hlm:metadataCountSeverity severity="ERROR" log="${build.id}_cenrep.cone.log" db="${metadata.dbfile}" property="cone.error.total"/>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   171
        <echo>ConE error: ${cone.error.total}</echo>
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   172
        <hlm:generateBuildStatus file="${build.id}_cenrep.cone.log" />
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   173
    </target>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   174
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   175
    <!-- Target that uses the information from the system.definition.files to prepare the IDO build area.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   176
        It relies on the fact that layer_real_source_path entity is declared in each ADO configuration.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   177
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   178
        By default it deletes the previous content. If you want to backup what was previoulsy used please
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   179
        defined '''ido.keep.old''' property.         
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   180
        -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   181
    <target name="ido-prep-copy" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   182
        <mkdir dir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   183
        <tempfile property="prep.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   184
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   185
        <!-- new implementation that only rely on Ant -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   186
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-ant-delete.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   187
                     outputFile="${prep.dynamic.config}.clean.xml">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   188
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   189
                    inputfile: antProperty(ado.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   190
                    ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   191
                        data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   192
                                java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   193
                                java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   194
                                props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   195
                                return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   196
                                ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   197
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   198
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   199
        <ant antfile="${prep.dynamic.config}.clean.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   200
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   201
        <!-- new implementation that only rely on Ant -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   202
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-ant-copy.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   203
            outputFile="${prep.dynamic.config}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   204
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   205
                inputfile: antProperty(ado.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   206
                ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   207
                    data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   208
                            java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   209
                            java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   210
                            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   211
                            return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   212
                            ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   213
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   214
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   215
        <ant antfile="${prep.dynamic.config}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   216
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   217
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   218
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   219
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   220
    Run cleanup system definition configuration. The configuration name are
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   221
    generated from the '''sysdef.configurations.list''' property, appending '_clean'
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   222
    at the end of each configuration also reversing their build order.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   223
    if '''sysdef.clean.configurations.list''' is defined it overrides
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   224
    the previous beharvious and is used to cleanup the environment.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   225
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   226
    <target name ="ido-prep-clean">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   227
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   228
            <not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   229
                <isset property="sysdef.clean.configurations.list"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   230
            </not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   231
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   232
                <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   233
                    <isset property="sysdef.configurations.list"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   234
                    <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   235
                        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   236
rev_names = ""
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   237
for sysdef in project.getProperty("sysdef.configurations.list").split(","):    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   238
    rev_names = sysdef + "_clean," + rev_names;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   239
project.setProperty("sysdef.clean.configurations.list", rev_names)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   240
                        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   241
                    </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   242
                    <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   243
                        <fail message="You should either define sysdef.clean.configurations.list or sysdef.configurations.list."/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   244
                    </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   245
                </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   246
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   247
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   248
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   249
        <antcall target="compile-main">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   250
            <param name="sysdef.configurations.list" value="${sysdef.clean.configurations.list}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   251
            <param name="compile.signal.input" value="compileCleanSignalInput"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   252
            <param name="compile.discard.result" value="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   253
            <param name="compile.cmd.clean" value="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   254
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   255
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   256
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   257
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   258
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   259
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   260
      Internal target that set an intermediate property to disable codescanner execution.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   261
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   262
    <target name="ido-codescanner-skip">
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   263
        <condition property="do.skip.codescanner" value="1">
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   264
            <istrue value="${skip.codescanner}"/>
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   265
        </condition>
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   266
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   267
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   268
    <!--
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   269
        This targets run the codescanner application on each discovered ADO.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   270
        The location of the output is defined byt '''ido.codescanner.output.dir''' property.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   271
        And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   272
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   273
    <target name="ido-codescanner" depends="ido-create-ado-mapping,ido-codescanner-skip" unless="do.skip.codescanner">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   274
        <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   275
        <!-- Defines the format of Codescanner output (html|xml|std).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   276
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   277
        -->
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   278
        <property name="ido.codescanner.output.type" value="html"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   279
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   280
""" internal.codescanner.drive """
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   281
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   282
import fileutils
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   283
import configuration
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   284
import pathaddition.relative
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   285
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   286
config = configuration.PropertiesConfiguration(stream=open(str(project.getProperty("ado.quality.mapping.file")), 'r'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   287
prefix = pathaddition.relative.commonprefix(config.keys())
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   288
if not os.path.exists(prefix):
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   289
    raise Exception("Could not find common prefix for the following paths:\n" + "\n".join(config.keys()))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   290
self.log(str('Substing %s' % prefix))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   291
drive = fileutils.get_next_free_drive()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   292
fileutils.subst(drive, prefix)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   293
project.setProperty('internal.codescanner.drive', drive)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   294
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   295
# creating the structure form subst drive.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   296
path = project.createDataType("path")
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   297
for location in config.keys():
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   298
    self.log(str("From %s" % location))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   299
    location = drive + os.sep + pathaddition.relative.abs2rel(location, prefix)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   300
    self.log(str("To %s" % location))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   301
    pe = path.createPathElement()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   302
    pe.setPath(location)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   303
project.addReference('substed.ado.src.path', path)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   304
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   305
        <hlm:codescanner dest="${ido.codescanner.output.dir}"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   306
            format="${ido.codescanner.output.type}"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   307
            configuration="${ido.codescanner.config}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   308
            <path refid="substed.ado.src.path"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   309
        </hlm:codescanner>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   310
        <hlm:unsubst drive="${internal.codescanner.drive}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   311
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   312
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   313
        <!-- CMT Tool target. Complexity tool measures. Supported options for cmt tool macro is
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   314
        1. input - files to be measured
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   315
        2. output - output xml file (file size is huge 68MB for JAVA IDO, if this needs to be send, need to consider
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   316
        3. config - input config . 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   317
        -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   318
    <target name="ido-cmt" depends="ido-create-ado-mapping" if="enable.cmt">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   319
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-cmt-ant.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   320
                          outputFile="${temp.build.dir}/ido-cmt.ant.xml">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   321
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   322
                        inputfile: antProperty(ado.quality.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   323
                        ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   324
                            data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   325
                                    java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   326
                                       java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   327
                                    props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   328
                                    return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   329
                                    ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   330
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   331
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   332
        <ant antfile="${temp.build.dir}/ido-cmt.ant.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   333
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   334
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   335
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   336
    <!-- Internal target that generates a temporary file that allow the 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   337
    either export of iby or either key*.xls. The generated Ant build file
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   338
    contains two targets with copy insturctions and generic set of fileset rules.     
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   339
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   340
    <target name="ido-create-copy-file" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   341
        <tempfile property="copyfile.dynamic.config" suffix=".ant.xml" deleteonexit="false" destdir="${temp.build.dir}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   342
        <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-export.ant.xml.ftl"
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   343
                      outputFile="${copyfile.dynamic.config}">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   344
            <data expandProperties="yes">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   345
                inputfile: antProperty(ado.mapping.file)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   346
                ant: antProperties()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   347
                data: eval('
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   348
                            java.io.FileInputStream pin = new java.io.FileInputStream(filename);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   349
                               java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   350
                            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   351
                            return props;
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   352
                            ', {filename:get(inputfile)})
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   353
            </data>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   354
        </fmpp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   355
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   356
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   357
    <!-- Do the export of the ibys from ADO work area level to epoc32 tree. -->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   358
    <target name="ido-copy-iby" depends="ido-create-copy-file">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   359
        <ant antfile="${copyfile.dynamic.config}" target="ido-copy-iby"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   360
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   361
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   362
    <!-- Do the export of the Excel keys*.xls from ADO work area level to 
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   363
    epoc32 tree.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   364
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   365
    <target name="ido-copy-cenrep" depends="ido-create-copy-file">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   366
        <delete dir="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   367
        <mkdir dir="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   368
        <ant antfile="${copyfile.dynamic.config}" target="ido-copy-cenrep"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   369
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   370
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   371
    <!-- Generated cenrep from exported keys*.xls files. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   372
    <target name="ido-create-cenrep" depends="ido-copy-cenrep">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   373
        <delete dir="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   374
        <mkdir dir="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   375
        <exec executable="perl" dir="${ido.cenrep.root}" failonerror="true">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   376
            <arg value="${build.drive}/epoc32/tools/cenrep/generate_cenrep_inifile.pl"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   377
            <arg value="-r"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   378
            <arg value="${ido.cenrep.platform}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   379
            <arg value="-d"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   380
            <arg value="${ido.cenrep.root}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   381
            <arg value="-rd"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   382
            <arg value="${ido.cenrep.root}/../data"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   383
        </exec>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   384
        <!-- Copy generated files to target path -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   385
        <copy todir="${ido.cenrep.target}" verbose="true" flatten="true" overwrite="true">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   386
            <fileset dir="${ido.cenrep.root}/../data">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   387
                <include name="*.txt"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   388
            </fileset>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   389
        </copy>    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   390
        
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   391
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   392
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   393
    <!-- Gets the contents from GRACE / Dragonfly -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   394
    <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   395
        <runtarget target="ido-check-latest-release-dragonfly"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   396
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   397
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   398
    <!--* @property s60.grace.server
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   399
        UNC path to GRACE server.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   400
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   401
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   402
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   403
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   404
    <!--* @property s60.grace.service
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   405
        GRACE service to look into.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   406
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   407
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   408
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   409
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   410
    <!--* @property s60.grace.product
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   411
        GRACE product to look into.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   412
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   413
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   414
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   415
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   416
    <!--* @property s60.grace.release
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   417
        Regular expression to match a particular GRACE realease.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   418
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   419
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   420
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   421
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   422
    <!--* @property s60.grace.release.fixbuildregex
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   423
        Regular expression to match a particular GRACE release fixbuilds. Example _(.*?)$ or _(\d+)$ 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   424
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   425
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   426
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   427
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   428
    <!--* @property s60.grace.cache
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   429
        Location of the Grace result cache for a builder.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   430
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   431
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   432
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   433
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   434
    <!--* @property s60.grace.checkmd5
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   435
        Enable MD5 validation for GRACE metadata (default: false).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   436
        @type boolean
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   437
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   438
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   439
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   440
    <!--* @property s60.grace.revision
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   441
        Defined the regular expression to find a particular revision.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   442
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   443
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   444
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   445
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   446
    <!--* @property s60.grace.usetickler
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   447
        Enable the detection of ready release using GRACE tickler mechanism.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   448
        @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   449
        @editable required
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   450
        @scope public
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   451
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   452
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   453
    <!-- Checks the contents from GRACE release. Mainly used by IDOs. But could be
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   454
    extended to product builds.-->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   455
    <target name="ido-check-latest-release-grace" unless="use.dragonfly">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   456
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   457
import os
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   458
import idoprep
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   459
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   460
result = idoprep.get_s60_env_details(project.getProperty('s60.grace.server'), project.getProperty('s60.grace.service'), project.getProperty('s60.grace.product'), project.getProperty('s60.grace.release'), project.getProperty('s60.grace.revision'), project.getProperty('s60.grace.cache'), project.getProperty('s60.grace.checkmd5'), project.getProperty('s60.grace.usetickler'))
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   461
resultname = os.path.basename(result[0])
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   462
project.setProperty('s60.getenv.path', str(result[0]))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   463
project.setProperty('s60.getenv.release', str(resultname))
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   464
version = idoprep.get_version(project.getProperty('build.drive'), resultname)
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   465
if version is None or version.strip() != resultname:
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   466
    project.setProperty('s60.getenv.update', "1")
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   467
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   468
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   469
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   470
    <!-- Updates the build area from either GRACE / dragonfly server.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   471
    <target name="ido-update-build-area" depends="backup-subst-drives,ido-update-build-area-grace" unless="env.HLM_SUBCON">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   472
        <runtarget target="ido-update-build-area-dragonfly"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   473
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   474
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   475
    <!-- Creates the build area by getting the contents from GRACE release.-->    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   476
    <target name="ido-update-build-area-grace" if="s60.getenv.update" depends="ido-check-latest-release" unless="use.dragonfly">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   477
        <!-- Just get S60 for IDOs -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   478
        <echo>Location of the new S60 release:${s60.getenv.path}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   479
        <tstamp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   480
            <format property="getenv.tstamp" pattern="yyyyMMddHHmmss"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   481
        </tstamp>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   482
        <antcall target="init-drive">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   483
            <param name="prep.build.dir" location="${prep.root.dir}/${getenv.tstamp}_${s60.getenv.release}"/>            
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   484
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   485
        <antcall target="preparation-getenv">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   486
            <param name="base_release.path" value="${s60.getenv.path}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   487
        </antcall>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   488
        <antcall target="ido-prep-variant"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   489
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   490
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   491
            <not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   492
                <hlm:hasSeverity severity="error" file="${build.cache.log.dir}/${build.id}_getenv.log.xml" />
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   493
            </not>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   494
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   495
                <hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   496
from path import path
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   497
print "Writing version file...."
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   498
vfile = path(r'${build.drive}'+"/").joinpath('s60_version.txt')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   499
f = open(str(vfile), 'w')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   500
f.write(path(r'${s60.getenv.path}').name)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   501
f.close()
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   502
                </hlm:python>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   503
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   504
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   505
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   506
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   507
    <!-- Gets the Contents for particular variant, by unpacking the variant zip from the metadata file.-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   508
    <target name="ido-prep-variant" if="ido.variant">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   509
        <script language="jython" setbeans="false">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   510
import re
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   511
import os
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   512
import symrec
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   513
from com.nokia.ant.util import Helper
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   514
rel_path = Helper.getProperty(project, 's60.getenv.path')
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   515
metadata = symrec.find_latest_metadata(str(rel_path))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   516
self.log(str("Release metadata file: %s." % metadata))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   517
rel_metadata = symrec.ReleaseMetadata(metadata)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   518
variant_pkg = rel_metadata.getVariantPackage(project.getProperty('ido.variant'))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   519
project.setProperty('ido.variant.package', os.path.join(rel_path, variant_pkg))
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   520
        </script>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   521
        <unzip src="${ido.variant.package}" dest="${build.drive}${env.EPOCROOT}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   522
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   523
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   524
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   525
    <!-- This target will help CI tool to trigger a build by updating a 's60.getenv.trigger.location' file timestamp. -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   526
    <target name="ido-latest-release-trigger" if="s60.getenv.update" depends="ido-check-latest-release">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   527
        <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   528
            <isset property="s60.getenv.trigger.location"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   529
            <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   530
                <echo>Touching the trigger.</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   531
                <touch file="${s60.getenv.trigger.location}"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   532
            </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   533
            <else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   534
                <echo>Property s60.getenv.trigger.location is not defined, trigger will not get updated.</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   535
            </else>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   536
        </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   537
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   538
    
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   539
    <!-- Convert keys of an ini file into a path structure.
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   540
        e.g: <pre><hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/></pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   541
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   542
    Usage example:
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   543
      <pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   544
        <target name="test-iniKeys2Path" depends="ido-create-ado-mapping">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   545
            <hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   546
            <hlm:codescanner dest="${build.drive}/codescanner">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   547
                <path refid="ado.src.path"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   548
            </hlm:codescanner>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   549
        </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   550
        </pre>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   551
    -->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   552
    <scriptdef name="iniKeys2Path" language="beanshell" uri="http://www.nokia.com/helium">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   553
        <attribute name="ini"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   554
        <attribute name="pathid"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   555
        if (attributes.get("ini") == null)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   556
            throw new org.apache.tools.ant.BuildException("ini is not defined");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   557
        if (attributes.get("pathid") == null)
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   558
            throw new org.apache.tools.ant.BuildException("pathid is not defined");
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   559
        try {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   560
            java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini"));
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   561
            java.util.Properties props = new java.util.Properties();
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   562
            props.load(pin);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   563
            org.apache.tools.ant.types.Path path = project.createDataType("path");
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   564
            for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { 
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   565
                org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement();
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents: 1
diff changeset
   566
                pe.setPath(i.next()); 
1
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   567
            }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   568
            self.log("Creating reference: " + attributes.get("pathid"));
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   569
            project.addReference(attributes.get("pathid"), path);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   570
        } catch (Exception e) {
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   571
            throw new org.apache.tools.ant.BuildException(e);
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   572
        }
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   573
    </scriptdef>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   574
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   575
    <!-- Target to get the Substituted drives information-->
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   576
    <target name="backup-subst-drives">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   577
        <exec dir="${cache.dir}" executable="subst.exe" osfamily="windows" output="${cache.dir}\hlmsubsteddrives.bat" failonerror="false"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   578
        <trycatch property="backup-subst-drives.exception">
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   579
            <try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   580
                <if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   581
                    <available file="${cache.dir}/hlmsubsteddrives.bat" type="file"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   582
                    <then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   583
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\\: => " replace=" " flags="g" byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   584
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="\A" replace="subst.exe " byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   585
                        <replaceregexp file="${cache.dir}\hlmsubsteddrives.bat" match="UNC" replace="\\\\" byline="true"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   586
                    </then>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   587
                </if>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   588
            </try>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   589
            <catch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   590
                <echo>${backup-subst-drives.exception}</echo>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   591
            </catch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   592
        </trycatch>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   593
    </target>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   594
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   595
    <import file="ci.ant.xml"/>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   596
</project>
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   597
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   598
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   599
be27ed110b50 Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff changeset
   600