buildframework/helium/tools/preparation/ido-prep.ant.xml
changeset 217 0f5e3a7fb6af
parent 179 d8ac696cc51f
child 587 85df38eb4012
equal deleted inserted replaced
181:59bb7c4d6172 217:0f5e3a7fb6af
    18 
    18 
    19 Description:
    19 Description:
    20 
    20 
    21 ============================================================================
    21 ============================================================================
    22 -->
    22 -->
       
    23 <!--* @package preparation -->
    23 <project name="ido-prep" xmlns:hlm="http://www.nokia.com/helium">
    24 <project name="ido-prep" xmlns:hlm="http://www.nokia.com/helium">
    24     <description>
    25     <description>
    25         IDO related targets.
    26         IDO related targets.
    26          * Build area preparation
    27          * Build area preparation
    27          * Codescanner integration
    28          * Codescanner integration
    28          * Cenrep generation (old way)
    29          * Cenrep generation (old way)
    29          * IBY export (old way)
    30          * IBY export (old way)
    30     </description>
    31     </description>
    31         
    32         
       
    33     <!-- Path to a INI file that contains the mapping between the ADO from Synergy WA and it's location on the BA.
       
    34     @type string
       
    35     @scope private
       
    36     -->
    32     <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
    37     <property name="ado.mapping.file" location="${build.output.dir}/build/ado_mapping.ini"/>
       
    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.
       
    39     @type string
       
    40     @scope private
       
    41     -->
    33     <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
    42     <property name="ado.quality.mapping.file" location="${build.output.dir}/build/ado_quality_mapping.ini"/>
       
    43     <!-- Path to the build romtree; the location contains iby files. Default value is "${build.drive}${env.EPOCROOT}/epoc32/rom/include"
       
    44     @type string
       
    45     @scope private
       
    46     -->
    34     <property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include"  />
    47     <property name="ido.romtree" location="${build.drive}${env.EPOCROOT}/epoc32/rom/include"  />
       
    48     <!-- Path to the cenrep root. Default value is "${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"
       
    49     @type string
       
    50     @scope private
       
    51     -->
    35     <property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"  />
    52     <property name="ido.cenrep.root" location="${build.drive}${env.EPOCROOT}/epoc32/tools/cenrep/ido/src"  />
       
    53     <!-- Path to the cenrep target directory. Default value is "${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"
       
    54     @type string
       
    55     @scope private
       
    56     -->
    36     <property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"  />
    57     <property name="ido.cenrep.target" value="${build.drive}${env.EPOCROOT}/epoc32/data/z/private/10202be9"  />
       
    58     <!-- Defines the location of Codescanner output.
       
    59     @type string
       
    60     -->
    37     <property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/>
    61     <property name="ido.codescanner.output.dir" location="${build.output.dir}/${build.id}_codescanner"/>
    38     
    62     
    39     <!-- Internal target that generates the '''ado.mapping.file'''.
    63     <!-- Internal target that generates the '''ado.mapping.file'''.
    40      It is a INI file that contains ADO location as a key and target location as value.
    64      It is a INI file that contains ADO location as a key and target location as value.
    41     -->
    65     -->
    67         </script>
    91         </script>
    68     </target>
    92     </target>
    69     
    93     
    70     <!-- Target to generate cenreps using cone tool -->
    94     <!-- Target to generate cenreps using cone tool -->
    71     <target name="ido-gen-cenrep">
    95     <target name="ido-gen-cenrep">
       
    96         <mkdir dir="${post.log.dir}" />
    72         <for list="${sysdef.configurations.list}" delimiter="," param="sysdef.config">
    97         <for list="${sysdef.configurations.list}" delimiter="," param="sysdef.config">
    73             <sequential>
    98             <sequential>
       
    99                 <var name="confml.log.file" unset="true"/>
    74                 <if>
   100                 <if>
    75                     <available file="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log"/>
   101                     <or>
       
   102                         <equals arg1="${build.system}" arg2="sbs" />
       
   103                         <equals arg1="${build.system}" arg2="sbs-ec" />
       
   104                     </or>
    76                     <then>
   105                     <then>
    77                         <hlm:grepMacro filename="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log" regexp="([^\\]*.confml)$" output="confml.file.list"/>
   106                         <hlm:getsbsinputs config="sbs.@{sysdef.config}" outputProperty="sbs.internal.inputs.list"/>
    78                         <for list="${confml.file.list}" delimiter="," param="confml.file">
   107                         <for list="${sbs.internal.inputs.list}" delimiter="," param="sbs.input">
    79                             <sequential>
   108                             <sequential>
    80                                 <var name="crml.regexp" unset="true"/>
   109                                 <hlm:getVariableValue name="--logfile" property="sbs.log.file">
    81                                 <propertyregex property="crml.regexp" input="@{confml.file}"  regexp="([^\.]*).confml" select="\1" />
   110                                     <hlm:sbsinput refid="@{sbs.input}" />
    82                                 <hlm:conEToolMacro>
   111                                 </hlm:getVariableValue>
    83                                     <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
   112                                 <property name="confml.log.file" value="${sbs.log.file}"/>
    84                                     <arg name="path" value="${build.drive}/epoc32/tools/" />
       
    85                                     <arg name="-v" value="5" />
       
    86                                     <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
    87                                     <arg name="-o" value="${build.drive}\epoc32\release\winscw\urel\z" />
       
    88                                     <arg name="-c" value="root.confml" />
       
    89                                     <arg name="-i" value="${crml.regexp}" />
       
    90                                 </hlm:conEToolMacro>
       
    91                                 <hlm:conEToolMacro>
       
    92                                     <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
       
    93                                     <arg name="path" value="${build.drive}/epoc32/tools/" />
       
    94                                     <arg name="-v" value="5" />
       
    95                                     <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
    96                                     <arg name="-o" value="${build.drive}\epoc32\release\winscw\udeb\z" />
       
    97                                     <arg name="-c" value="root.confml" />
       
    98                                     <arg name="-i" value="${crml.regexp}" />
       
    99                                 </hlm:conEToolMacro>
       
   100                             </sequential>
   113                             </sequential>
   101                         </for>
   114                         </for>
   102                     </then>
   115                     </then>
       
   116                     <else>
       
   117                         <property name="confml.log.file" value="${compile.log.dir}/${build.id}.@{sysdef.config}_compile.log"/>
       
   118                     </else>
   103                 </if>
   119                 </if>
   104             </sequential>
   120             </sequential>
   105         </for>
   121         </for>
   106         <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true">
   122         <echo>confml.log.file = ${confml.log.file}</echo>
       
   123         <if>
       
   124             <available file="${confml.log.file}"/>
       
   125             <then>
       
   126                 <hlm:grepMacro filename="${confml.log.file}" regexp="([^\\/.]*?)\.confml" output="confml.file.list"/>
       
   127                 <for list="${confml.file.list}" delimiter="," param="confml.file">
       
   128                     <sequential>
       
   129                         <var name="crml.regexp" unset="true"/>
       
   130                         <echo>confml.file = @{confml.file}</echo>
       
   131                         <hlm:conEToolMacro>
       
   132                             <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
       
   133                             <arg name="path" value="${build.drive}/epoc32/tools/" />
       
   134                             <arg name="-v" value="5" />
       
   135                             <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
   136                             <arg name="-o" value="${build.drive}\epoc32\release\winscw\urel\z" />
       
   137                             <arg name="-c" value="root.confml" />
       
   138                             <arg name="-i" value="@{confml.file}" />
       
   139                         </hlm:conEToolMacro>
       
   140                         <hlm:conEToolMacro>
       
   141                             <arg name="output" value="${post.log.dir}/${build.id}_cenrep.cone.log"/>
       
   142                             <arg name="path" value="${build.drive}/epoc32/tools/" />
       
   143                             <arg name="-v" value="5" />
       
   144                             <arg name="-p" value="${build.drive}\epoc32\rom\config\assets\s60" />
       
   145                             <arg name="-o" value="${build.drive}\epoc32\release\winscw\udeb\z" />
       
   146                             <arg name="-c" value="root.confml" />
       
   147                             <arg name="-i" value="@{confml.file}" />
       
   148                         </hlm:conEToolMacro>
       
   149                     </sequential>
       
   150                 </for>
       
   151             </then>
       
   152         </if>
       
   153         <copy file="${post.log.dir}/${build.id}_cenrep.cone.log" tofile="${temp.build.dir}/${build.id}_cenrep_includefile.txt" overwrite="true" failonerror="false">
   107             <filterchain>
   154             <filterchain>
   108                 <linecontainsregexp>
   155                 <linecontainsregexp>
   109                     <regexp pattern="^\s*Generating file"/>
   156                     <regexp pattern="^\s*Generating file"/>
   110                 </linecontainsregexp>
   157                 </linecontainsregexp>
   111             </filterchain>
   158             </filterchain>
   223         The location of the output is defined byt '''ido.codescanner.output.dir''' property.
   270         The location of the output is defined byt '''ido.codescanner.output.dir''' property.
   224         And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
   271         And the type is defined by '''ido.codescanner.output.type''' (default is HTML). 
   225     -->
   272     -->
   226     <target name="ido-codescanner" depends="ido-create-ado-mapping,ido-codescanner-skip" unless="do.skip.codescanner">
   273     <target name="ido-codescanner" depends="ido-create-ado-mapping,ido-codescanner-skip" unless="do.skip.codescanner">
   227         <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
   274         <!--hlm:iniKeys2Path ini="${ado.mapping.file}" pathid="ado.src.path"/-->
       
   275         <!-- Defines the format of Codescanner output (html|xml|std).
       
   276         @type string
       
   277         -->
   228         <property name="ido.codescanner.output.type" value="html"/>
   278         <property name="ido.codescanner.output.type" value="html"/>
   229         <script language="jython" setbeans="false">
   279         <script language="jython" setbeans="false">
   230 """ internal.codescanner.drive """
   280 """ internal.codescanner.drive """
   231 import os
   281 import os
   232 import fileutils
   282 import fileutils
   342 
   392 
   343     <!-- Gets the contents from GRACE / Dragonfly -->
   393     <!-- Gets the contents from GRACE / Dragonfly -->
   344     <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
   394     <target name="ido-check-latest-release" depends="ido-check-latest-release-grace" unless="env.HLM_SUBCON">
   345         <runtarget target="ido-check-latest-release-dragonfly"/>
   395         <runtarget target="ido-check-latest-release-dragonfly"/>
   346     </target>
   396     </target>
       
   397 
       
   398     <!--* @property s60.grace.server
       
   399         UNC path to GRACE server.
       
   400         @type string
       
   401         @editable required
       
   402         @scope public
       
   403     -->
       
   404     <!--* @property s60.grace.service
       
   405         GRACE service to look into.
       
   406         @type string
       
   407         @editable required
       
   408         @scope public
       
   409     -->
       
   410     <!--* @property s60.grace.product
       
   411         GRACE product to look into.
       
   412         @type string
       
   413         @editable required
       
   414         @scope public
       
   415     -->
       
   416     <!--* @property s60.grace.release
       
   417         Regular expression to match a particular GRACE realease.
       
   418         @type string
       
   419         @editable required
       
   420         @scope public
       
   421     -->
       
   422     <!--* @property s60.grace.release.fixbuildregex
       
   423         Regular expression to match a particular GRACE release fixbuilds. Example _(.*?)$ or _(\d+)$ 
       
   424         @type string
       
   425         @editable required
       
   426         @scope public
       
   427     -->
       
   428     <!--* @property s60.grace.cache
       
   429         Location of the Grace result cache for a builder.
       
   430         @type string
       
   431         @editable required
       
   432         @scope public
       
   433     -->
       
   434     <!--* @property s60.grace.checkmd5
       
   435         Enable MD5 validation for GRACE metadata (default: false).
       
   436         @type boolean
       
   437         @editable required
       
   438         @scope public
       
   439     -->
       
   440     <!--* @property s60.grace.revision
       
   441         Defined the regular expression to find a particular revision.
       
   442         @type string
       
   443         @editable required
       
   444         @scope public
       
   445     -->
       
   446     <!--* @property s60.grace.usetickler
       
   447         Enable the detection of ready release using GRACE tickler mechanism.
       
   448         @type string
       
   449         @editable required
       
   450         @scope public
       
   451     -->
   347 
   452 
   348     <!-- Checks the contents from GRACE release. Mainly used by IDOs. But could be
   453     <!-- Checks the contents from GRACE release. Mainly used by IDOs. But could be
   349     extended to product builds.-->    
   454     extended to product builds.-->    
   350     <target name="ido-check-latest-release-grace" unless="use.dragonfly">
   455     <target name="ido-check-latest-release-grace" unless="use.dragonfly">
   351         <script language="jython" setbeans="false">
   456         <script language="jython" setbeans="false">