buildframework/helium/tools/compile/ec/ec.ant.xml
branchwip
changeset 380 db59fc762214
parent 217 0f5e3a7fb6af
child 628 7c4a911dc066
equal deleted inserted replaced
369:1248e8f6a72d 380:db59fc762214
    18 
    18 
    19 Description:
    19 Description:
    20 
    20 
    21 ============================================================================
    21 ============================================================================
    22 -->
    22 -->
       
    23 <!--* @package compile -->
    23 <project name="compile.ec" xmlns:hlm="http://www.nokia.com/helium">
    24 <project name="compile.ec" xmlns:hlm="http://www.nokia.com/helium">
    24     <description>
    25     <description>
    25         EC compilation targets.
    26         EC compilation targets.
    26     </description>
    27     </description>
    27 
    28 
       
    29     <!-- Location of emake tool.
       
    30     @type string
       
    31     @scope private
       
    32     -->
    28     <property name="ec.emake" value="emake"/>
    33     <property name="ec.emake" value="emake"/>
       
    34     <!-- Location of the Makefile generated to run the EC build.
       
    35     @type string
       
    36     @scope private
       
    37     -->
    29     <property name="ec.makefile.file" location="${build.drive}/Makefile"/>
    38     <property name="ec.makefile.file" location="${build.drive}/Makefile"/>
    30 
    39 
       
    40     <!-- Location of sysdef2make.pl file, which is used to translate system definition files to make files. Internal property that normally does not require changes.
       
    41     @type string
       
    42     @scope private
       
    43     -->
    31     <property name="ec.sysdef2make" location="${helium.dir}/tools/compile/ec/sysdef2make.pl"/>
    44     <property name="ec.sysdef2make" location="${helium.dir}/tools/compile/ec/sysdef2make.pl"/>
       
    45     <!-- Extra command line parameters for the sysdef2make call.
       
    46     @type string
       
    47     -->
       
    48     <property name="ec.sysdef2make.cmdline" value="-forcemake ((abld.*\-(w|what|c|check))|(abld.*resource))" />
    32     
    49     
       
    50     <!-- Temporary location of the EC history file used by the current build.
       
    51     @type string
       
    52     @scope private
       
    53     -->
    33     <property name="ec.historyfile" value="${build.drive}/emake.data"/>
    54     <property name="ec.historyfile" value="${build.drive}/emake.data"/>
       
    55     <!-- memory limit for EC execution. See user guide for more details
       
    56     @type string
       
    57     @scope private
       
    58     -->
    34     <property name="ec.mem.limit" value="1000000000"/>
    59     <property name="ec.mem.limit" value="1000000000"/>
    35     
    60     
    36     <!-- This can be used to query cluster manager to find information about the build. Set
    61     <!-- This can be used to query cluster manager to find information about the build. Set
    37     to default as all the clusture supports default class id.-->
    62     to default as all the clusture supports default class id.-->
       
    63     <!-- Build class for Electric Cloud. No default value.
       
    64     @type string
       
    65     @scope private
       
    66     -->
    38     <property name="ec.build.class" value="default"/>
    67     <property name="ec.build.class" value="default"/>
    39     
    68     
    40 
    69 
    41     <!-- Converting cononical SDF into a Makefile. -->
    70     <!-- Converting cononical SDF into a Makefile. -->
    42     <target name="compile-genxml-ec" if="build.system.ec-helium">
    71     <target name="compile-genxml-ec" if="build.system.ec-helium">
    43         <!-- Using now the official script for GTI. -->
    72         <!-- Using now the official script for GTI. -->
    44         <exec executable="perl" dir="${build.drive}/" error="${build.log.dir}/${build.id}.${sysdef.configuration}.sysdef2make.log" failonerror="${failonerror}">
    73         <exec executable="perl" dir="${build.drive}/" error="${compile.log.dir}/${build.id}.${sysdef.configuration}.sysdef2make.log" failonerror="${failonerror}">
    45             <arg line="${ec.sysdef2make} -n ${sysdef.configuration} -s ${env.EPOCROOT} -forcemake ((abld.*\-(w|what|c|check))|(abld.*resource)) ${canonical.sysdef.file}"/>
    74             <arg line="${ec.sysdef2make} -n ${sysdef.configuration} -s ${env.EPOCROOT} ${ec.sysdef2make.cmdline} ${canonical.sysdef.file}"/>
    46         </exec>
    75         </exec>
    47         <hlm:metadatarecord database="${metadata.dbfile}">
    76         <hlm:metadatarecord database="${metadata.dbfile}">
    48             <hlm:textmetadatainput>
    77             <hlm:textmetadatainput>
    49                 <fileset casesensitive="false" file="${build.log.dir}/${build.id}.${sysdef.configuration}.sysdef2make.log"/>
    78                 <fileset casesensitive="false" file="${compile.log.dir}/${build.id}.${sysdef.configuration}.sysdef2make.log"/>
    50                 <metadatafilterset refid="filterset.genxml.ec" />
    79                 <metadatafilterset refid="filterset.genxml.ec" />
    51             </hlm:textmetadatainput>
    80             </hlm:textmetadatainput>
    52         </hlm:metadatarecord>
    81         </hlm:metadatarecord>
    53         <hlm:generateBuildStatus file="${build.id}.${sysdef.configuration}.sysdef2make.log" />
    82         <hlm:generateBuildStatus file="${build.id}.${sysdef.configuration}.sysdef2make.log" />
    54     </target>
    83     </target>
   148                 <echo message="Single Node Build : Mode Serial" />
   177                 <echo message="Single Node Build : Mode Serial" />
   149                 <var name="ec.maxagents" value="1"/>
   178                 <var name="ec.maxagents" value="1"/>
   150                 <var name="ec.history.option" value="create"/>
   179                 <var name="ec.history.option" value="create"/>
   151             </then>
   180             </then>
   152             <else>
   181             <else>
       
   182                 <!-- Maximum number of agent to be used
       
   183                 @type string
       
   184                 -->
   153                 <property name="ec.maxagents" value="0"/>    
   185                 <property name="ec.maxagents" value="0"/>    
       
   186                 <!-- Should be create for single node build and merge for multi node build.
       
   187                 @type string
       
   188                 @scope private
       
   189                 -->
   154                 <property name="ec.history.option" value="merge"/>
   190                 <property name="ec.history.option" value="merge"/>
   155                 <if>
   191                 <if>
   156                     <isset property="week.number"/>
   192                     <isset property="week.number"/>
   157                     <then>
   193                     <then>
   158                         <antcall target="find-previous-history-file"/>
   194                         <antcall target="find-previous-history-file"/>
   281     transfered to proper error message. -->
   317     transfered to proper error message. -->
   282     <target name="compile-ec-logs">
   318     <target name="compile-ec-logs">
   283         <echo>Cleaning up the logs....</echo>
   319         <echo>Cleaning up the logs....</echo>
   284         <exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}">
   320         <exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}">
   285             <arg line="${helium.dir}/tools/compile/ec/ec_whatcheck.pl"/>
   321             <arg line="${helium.dir}/tools/compile/ec/ec_whatcheck.pl"/>
   286             <redirector input="${build.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"
   322             <redirector input="${compile.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"
   287                 output="${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log"/>
   323                 output="${compile.log.dir}/${build.id}.${sysdef.configuration}_compile.log"/>
   288         </exec>
   324         </exec>
   289     </target>
   325     </target>
   290 
   326 
   291 
   327 
   292     <!-- Build the component using EC. This is the only target for EC builds.
   328     <!-- Build the component using EC. This is the only target for EC builds.
   306         </if>
   342         </if>
   307         
   343         
   308         <echo>emake debug flag: ${emake_debug_flag}</echo>
   344         <echo>emake debug flag: ${emake_debug_flag}</echo>
   309 
   345 
   310         <echo>Building ${sysdef.configuration}....</echo>
   346         <echo>Building ${sysdef.configuration}....</echo>
   311         <echo file="${build.log.dir}/${build.id}.${sysdef.configuration}_run_emake.bat" level="info">
   347         <echo file="${temp.build.dir}/${build.id}.${sysdef.configuration}_run_emake.bat" level="info">
   312 set
   348 set
   313 ${ec.emake} --emake-build-label=${build.id}.${sysdef.configuration} --emake-class=${ec.build.class} --emake-priority=normal --emake-maxagents=${ec.maxagents} --emake-job-limit=0 --emake-mem-limit=${ec.mem.limit} --emake-history=${ec.history.option} --emake-annodetail=basic,history,file,waiting --emake-annofile=${build.log.dir}\${build.id}.${sysdef.configuration}.emake.anno.xml --emake-historyfile=${ec.historyfile} --emake-debug=${emake_debug_flag} --emake-logfile=${build.log.dir}\${build.id}.${sysdef.configuration}.emake.g.dlog --emake-root=%EMAKE_ROOT%;${helium.dir} --emake-autodepend=1 -k -i -f ${build.drive}/${sysdef.configuration}.make LOGBUILDTIME=&quot;&quot; VERBOSE=&quot;&quot; SAVESPACE=&quot;&quot; ${sysdef.configuration}
   349 ${ec.emake} --emake-build-label=${build.id}.${sysdef.configuration} --emake-class=${ec.build.class} --emake-priority=normal --emake-maxagents=${ec.maxagents} --emake-job-limit=0 --emake-mem-limit=${ec.mem.limit} --emake-history=${ec.history.option} --emake-annodetail=basic,history,file,waiting --emake-annofile=${compile.log.dir}\${build.id}.${sysdef.configuration}.emake.anno.xml --emake-historyfile=${ec.historyfile} --emake-debug=${emake_debug_flag} --emake-logfile=${compile.log.dir}\${build.id}.${sysdef.configuration}.emake.g.dlog --emake-root=%EMAKE_ROOT%;${helium.dir} --emake-autodepend=1 -k -i -f ${build.drive}/${sysdef.configuration}.make LOGBUILDTIME=&quot;&quot; VERBOSE=&quot;&quot; SAVESPACE=&quot;&quot; ${sysdef.configuration}
   314         </echo>
   350         </echo>
   315 
   351 
   316         <exec executable="${build.log.dir}/${build.id}.${sysdef.configuration}_run_emake.bat"
   352         <exec executable="${temp.build.dir}/${build.id}.${sysdef.configuration}_run_emake.bat"
   317               dir="${build.drive}/" output="${build.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"
   353               dir="${build.drive}/" output="${compile.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"
   318               failonerror="${failonerror}">
   354               failonerror="${failonerror}">
   319             <env key="SYMBIANBUILD_DEPENDENCYOFF" value="1" />
   355             <env key="SYMBIANBUILD_DEPENDENCYOFF" value="1" />
   320         </exec>
   356         </exec>
   321         
   357         
   322         <antcall target="compile-ec-unpatch"/>
   358         <antcall target="compile-ec-unpatch"/>
   323         <antcall target="compile-ec-logs"/>
   359         <antcall target="compile-ec-logs"/>
   324 
   360 
   325         <!-- Testing everything happens correctly. -->
   361         <!-- Testing everything happens correctly. -->
   326         <hlm:assertFileExists file="${build.log.dir}/${build.id}.${sysdef.configuration}_run_emake.bat"/>
   362         <hlm:assertFileExists file="${temp.build.dir}/${build.id}.${sysdef.configuration}_run_emake.bat"/>
   327         <hlm:assertFileExists file="${build.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"/>
   363         <hlm:assertFileExists file="${compile.log.dir}/${build.id}.${sysdef.configuration}_build_output.log"/>
   328         <hlm:assertFileExists file="${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log"/>
   364         <hlm:assertFileExists file="${compile.log.dir}/${build.id}.${sysdef.configuration}_compile.log"/>
   329         <hlm:calculateErrorsFromLog logfile="${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log" />
       
   330     </target>
   365     </target>
   331 </project>
   366 </project>