common/build.xml
changeset 192 d5964b46ccaf
parent 189 dec10768c3a4
parent 114 585c31b1dac6
child 193 19a76650e06d
equal deleted inserted replaced
191:56e7098e1ace 192:d5964b46ccaf
     1 <?xml version="1.0" encoding="UTF-8"?>
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="SF-COMMON-CONFIG">
     2 <project name="SF-COMMON-CONFIG" xmlns:hlm="http://www.nokia.com/helium">
     3 
     3 
     4     <property environment="env"/> <!-- make environment variables available via env -->
     4     <property environment="env"/> <!-- make environment variables available via env -->
     5     
     5     
     6     <dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
     6     <dirname property="sf.common.config.dir" file="${ant.file.SF-COMMON-CONFIG}"/>
     7     
     7     
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    27     
    27     
    28     <!-- import all core HELIUM targets -->
    28     <!-- import all core HELIUM targets -->
    29     <import file="${helium.dir}/helium.ant.xml" />
    29     <import file="${helium.dir}/helium.ant.xml" />
    30     
    30     
    31     <!-- import other files -->
       
    32     <import file="${sf.common.config.dir}/smoketest/smoke_test.ant.xml" />
       
    33     
       
    34     <!-- import common references -->
    31     <!-- import common references -->
    35     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    32     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    36              
    33              
    37     <!-- conditional import of generated source spec if available -->
    34     <!-- conditional import of generated source spec if available -->
    38     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    35     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    39         <then>		    		
    36         <then>
    40             <echo message="Generated source spec found, importing..." />
    37             <echo message="Generated source spec found, importing..." />
    41     				<import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
    38             <import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
    42     		</then>
    39         </then>
    43     </if>
    40     </if>
    44     
    41      
    45     <!--
       
    46     ** TARGET DEFINITIONS
       
    47     -->   
       
    48     
    42     
    49     <target name="sf-prep" depends="sf-generate-source-spec,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
    43     <target name="sf-prep" depends="sf-generate-source-spec,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
    50         <echo>[SF-PREP]</echo>
    44         <echo>[SF-PREP]</echo>
    51         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    45         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    52     </target>
    46     </target>
   139                 
   133                 
   140                 <!-- run internal target preparation-getenv -->
   134                 <!-- run internal target preparation-getenv -->
   141                 <runtarget target="preparation-getenv"/>
   135                 <runtarget target="preparation-getenv"/>
   142                 
   136                 
   143             </then>
   137             </then>
       
   138             <else>
       
   139                 <!-- record fact that no baseline used. required by diamondize-bom  -->
       
   140                 <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
       
   141             </else>
   144         </if>
   142         </if>
   145         
   143         
   146         <if>
   144         <if>
   147             <istrue value="${sf.spec.sourcesync.enable}" />
   145             <istrue value="${sf.spec.sourcesync.enable}" />
   148             <then>
   146             <then>
   149                 <runtarget target="sf-get-source"/>
   147                 <runtarget target="sf-get-source"/>
   150             </then>
   148                 
   151         </if>
   149                 <if><istrue value="${sf.spec.package.src.enable}"/>
   152         
   150                 <then>
       
   151                     <echo message="INFO Packaging Source"/>
       
   152                     <runtarget target="sf-package-source"/>
       
   153                 </then>
       
   154                 </if>
       
   155                 
       
   156                 <runtarget target="sf-unpack-rnd"/>
       
   157             </then>
       
   158             <else>
       
   159                 <!-- record fact that no sources.csv used. required by diamondize-bom  -->
       
   160                 <touch file="${build.log.dir}/BOM/sources.csv"/> 
       
   161             </else>
       
   162         </if>        
   153       <if>
   163       <if>
   154         <istrue value="${sf.spec.publish.enable}"/>
   164         <istrue value="${sf.spec.publish.enable}"/>
   155         <then>
   165         <then>
   156           <runtarget target="sf-diamondize-bom"/>
   166           <runtarget target="sf-diamondize-bom"/>
   157         </then>
   167         </then>
   158       </if>
   168       </if>
   159     </target>
   169     </target>
   160     
   170     
   161   <target name="sf-postbuild" depends="sf-zip-logs">
   171     <target name="sf-postbuild">
   162     <echo>[SF-POSTBUILD]</echo>
   172         <echo>[SF-POSTBUILD]</echo>
   163     
   173                 
   164     <!-- TAG SOURCE CODE -->
   174         <!-- TAG SOURCE CODE -->
   165     <if>
   175         <if>
   166       <istrue value="${sf.spec.tagafterbuild.enable}" />
   176             <istrue value="${sf.spec.tagafterbuild.enable}" />
   167       <then>
   177             <then>
   168         <echo message="Apply tag to the source code used in this build"/>
   178                 <echo message="Apply tag to the source code used in this build"/>
   169         <runtarget target="sf-tag-hg-code"/>
   179                 <runtarget target="sf-tag-hg-code"/>
   170       </then>
   180             </then>
   171     </if>
   181         </if>
   172 
   182     
   173     <!-- PUBLISH LOGS/REPORTS -->
   183         <if>
   174     <if>
   184             <istrue value="${sf.spec.package.bin.enable}"/>
   175       <istrue value="${sf.spec.publish.enable}" />
   185             <then>
   176       <then>
   186                 <echo message="INFO Packaging Binaries"/>
   177         <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   187                 <runtarget target="sf-package-binary"/>
   178         <runtarget target="publish"/>
   188             </then>
   179       </then>
   189         </if>
   180     </if>
   190 
   181     
   191         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
   182     <!-- EXEC SMOKE TEST -->
   192             <then>
   183     <if>
   193                 <runtarget target="sf-send-testpkg"/>
   184       <istrue value="${sf.spec.smoketest.enable}"/>
   194             </then>
   185       <then>
   195         </if>
   186         <runtarget target="sf-smoke-test"/>
   196 
   187       </then>
   197         <!-- run build analysis tools -->
   188     </if>
   198         <runtarget target="sf-run-analysis"/>
   189     
   199 
   190   </target>
   200         <runtarget target="sf-zip-logs"/>
   191 
   201 
   192   <!-- package all logs into zipfile before publish -->
   202         <!-- PUBLISH LOGS/REPORTS -->
   193   <target name="sf-zip-logs">
   203         <if>
   194     <if>
   204             <istrue value="${sf.spec.publish.enable}" />
   195       <istrue value="${sf.spec.logs.zip.enable}"/>
   205             <then>
   196       <then>
   206                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   197         <property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
   207                 <runtarget target="publish"/>
   198         <echo message="Zip log requested, zipping logs..."/>
   208             </then>
   199         <zip destfile="${temp.log.zip}" basedir="${build.log.dir}"/>
   209         </if>
   200         <move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>
   210     </target>
   201       </then>
   211 
   202     </if>
   212     <!-- package all logs into zipfile before publish -->
   203   </target>
   213     <target name="sf-zip-logs">
   204 
   214         <if>
   205   <!-- generate dir list using passed location and name 
   215             <istrue value="${sf.spec.logs.zip.enable}"/>
   206   if a baseline list is available then generate deltas too -->
   216             <then>
   207 
   217                 <property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
   208   <target name="sf-list-dir">
   218                 <echo message="Zip log requested, zipping logs..."/>
   209     <property name="sf.currentlist.name"   value="${sf.list.name}"/> 
   219                 <zip destfile="${temp.log.zip}" basedir="${build.log.dir}"/>
   210     <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
   220                 <move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>
   211 
   221             </then>
   212     <if>
   222         </if>
   213       <istrue value="${sf.spec.dirlist.enable}"/>
   223     </target>
   214       <then>
   224     
   215         <echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location}"/>
   225     <!-- generate dir list using passed location and name 
   216         <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
   226     if a baseline list is available then generate deltas too -->
   217           <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
   227 
   218           <arg value="${sf.dir.location}"/>
   228     <target name="sf-list-dir">
   219         </exec>
   229         <property name="sf.currentlist.name"   value="${sf.list.name}"/> 
   220       </then>
   230         <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
   221     </if>
   231     
   222   </target>
   232         <if>
   223 	
   233             <istrue value="${sf.spec.dirlist.enable}"/>
   224   <target name="sf-delta-dir">
   234             <then>
   225     <property name="sf.currentlist_a.name"   value="${sf.list_b.name}"/> 
   235                 <echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location}"/>
   226     <property name="sf.currentlist_b.name"   value="${sf.list_b.name}"/>
   236                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
   227     <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
   237                     <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
   228     		
   238                     <arg value="${sf.dir.location}"/>
   229     <if>
   239                 </exec>
   230       <istrue value="${sf.spec.dirdelta.enable}"/>
   240             </then>
   231       <then>
   241         </if>
   232         <echo message="Delta requested for ${sf.currentlist_a.name} vs ${sf.currentlist_b.name} "/>
   242     </target>
   233         <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}_delta.log">
   243     
   234           <arg value="${sf.common.config.dir}/tools/difflist.pl"/>
   244     <target name="sf-delta-dir">
   235           <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_a.name}.log"/>
   245         <property name="sf.currentlist_a.name"   value="${sf.list_a.name}"/> 
   236           <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}.log"/>
   246         <property name="sf.currentlist_b.name"   value="${sf.list_b.name}"/>
   237         </exec>
   247         <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
   238       </then>
   248         
   239     </if>
   249         <if>
   240   </target>
   250             <istrue value="${sf.spec.dirdelta.enable}"/>
       
   251             <then>
       
   252                 <echo message="Delta requested for ${sf.currentlist_a.name} vs ${sf.currentlist_b.name} "/>
       
   253                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}_delta.log">
       
   254                     <arg value="${sf.common.config.dir}/tools/difflist.pl"/>
       
   255                     <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_a.name}.log"/>
       
   256                     <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}.log"/>
       
   257                 </exec>
       
   258             </then>
       
   259         </if>
       
   260     </target>
   241   
   261   
       
   262     <target name="sf-intersect-dir">
       
   263         <property name="sf.currentlist_a.name"   value="${sf.list_a.name}"/> 
       
   264         <property name="sf.currentlist_b.name"   value="${sf.list_b.name}"/>
       
   265         <property name="sf.dir.location" value="${build.drive}/epoc32"/> 
       
   266     
       
   267         <if>
       
   268             <istrue value="${sf.spec.dirdelta.enable}"/>
       
   269             <then>
       
   270                 <echo message="Inersection requested for ${sf.currentlist_a.name} vs ${sf.currentlist_b.name} "/>
       
   271                 <exec executable="perl" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}_intersect.log">
       
   272                     <arg value="${sf.common.config.dir}/tools/difflist.pl"/>
       
   273                     <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_a.name}.log"/>
       
   274                     <arg value="${build.log.dir}/listdir_${build.id}_${sf.currentlist_b.name}.log"/>
       
   275                     <arg value="-I"/> <!-- run difflist in intersect mode -->
       
   276                 </exec>
       
   277             </then>
       
   278         </if>
       
   279     </target>
       
   280 
   242     <target name="sf-build-noprep" depends="sf-compile">
   281     <target name="sf-build-noprep" depends="sf-compile">
   243         <echo>[SF-BUILD-NOPREP]</echo>
   282         <echo>[SF-BUILD-NOPREP]</echo>
   244     </target>
   283     </target>
   245     
   284     
   246     <target name="create-canonical-sysdef-file">
   285     <target name="create-canonical-sysdef-file">
   247       <if>
   286         <if>
   248         <istrue value="${sf.spec.systemdefinition.assemble}"/>
   287             <istrue value="${sf.spec.systemdefinition.assemble}"/>
   249         <then>
   288             <then>
   250           <echo message="Calling Helium create-canonical-sysdef-file target to assemble sysdef fragments."/>
   289                 <echo message="Calling Helium create-canonical-sysdef-file target to assemble sysdef fragments."/>
   251           <runtarget target="compile.create-canonical-sysdef-file"/>
   290                 <runtarget target="compile.create-canonical-sysdef-file"/>
   252         </then>
   291             </then>
   253         <else>
   292             <else>
   254           <echo message="Will use ${build.drive}/${sf.spec.systemdefinition.location} as is as sysdef file"/>
   293                 <echo message="Will use ${build.drive}/${sf.spec.systemdefinition.location} as is as sysdef file"/>
   255           <copy file="${build.drive}/${sf.spec.systemdefinition.location}" tofile="${build.drive}/output/build/canonical_system_definition.xml" failonerror="true" verbose="true"/>
   294                 <copy file="${build.drive}/${sf.spec.systemdefinition.location}" tofile="${build.drive}/output/build/canonical_system_definition.xml" failonerror="true" verbose="true"/>
   256         </else>
   295             </else>
   257       </if>
   296         </if>
   258     </target>
   297     </target>
   259     
   298     
   260     <target name="sf-compile">    
   299     <target name="sf-compile">    
   261     
   300         <!-- TODO: add here assigments to raptor-related ant references -->
   262     	<!-- TODO: add here assigments to raptor-related ant references -->
   301     
   263  	
   302         <!-- hlm:argSet id="sbs.tools.var">
   264     	<!-- hlm:argSet id="sbs.tools.var">
   303             <hlm:arg name="config" value="${sf.spec.sbs.config}" />
   265 			<hlm:arg name="config" value="${sf.spec.sbs.config}" />
   304             <hlm:arg name="singlejob" value="..." />
   266 			<hlm:arg name="singlejob" value="..." />
   305             <hlm:arg name="enable-filter" value="..." />
   267 			<hlm:arg name="enable-filter" value="..." />
   306         </hlm:argSet -->
   268 		</hlm:argSet -->
   307         
   269     	
       
   270         <!-- target name="compile-main-prebuild" -->
   308         <!-- target name="compile-main-prebuild" -->
   271         <antcall target="compile-main" inheritAll="false">
   309         <antcall target="compile-main" inheritAll="false">
   272             <param name="build.system" value="${sf.spec.build.system}"/>
   310             <param name="build.system" value="${sf.spec.build.system}"/>
   273             <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
   311             <param name="sysdef.configurations.list" value="${sf.spec.sysdef.configurations.list}" />
   274             <!--<reference refid="sf.system.definition.files" torefid="system.definition.files" />-->
   312             <!--<reference refid="sf.system.definition.files" torefid="system.definition.files" />-->
   278     <target name="sf-get-source" depends="sf-generate-source-spec">
   316     <target name="sf-get-source" depends="sf-generate-source-spec">
   279         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   317         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   280     </target>
   318     </target>
   281     
   319     
   282     <target name="sf-tag-hg-code">
   320     <target name="sf-tag-hg-code">
   283       <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   321         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
   284       <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   322         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
   285             outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   323               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
   286         <data expandProperties="yes">
   324             <data expandProperties="yes">
   287               ant: antProperties()
   325                 ant: antProperties()
   288               data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   326                 data: csv(${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   289         </data>
   327             </data>
   290       </fmpp>
   328         </fmpp>
   291       <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   329         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   292     </target>
   330     </target>
   293     
   331     
   294     <target name="sf-diamondize-bom">
   332     <target name="sf-diamondize-bom">
   295       <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   333         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   296             outputFile="${build.drive}/output/logs/BOM/build-info.xml">
   334               outputFile="${build.drive}/output/logs/BOM/build-info.xml">
   297         <data expandProperties="yes">
   335             <data expandProperties="yes">
   298               ant: antProperties()
   336                 ant: antProperties()
   299               config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   337                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   300               project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   338                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   301               baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   339                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   302               sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,rev]})
   340                 sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,rev]})              
   303               
   341             </data>
   304         </data>
   342         </fmpp>
   305       </fmpp>
       
   306     </target>
   343     </target>
   307     
   344     
   308   <target name="generate-layers">
   345   <target name="generate-layers">
   309     <echo message="canno-file:${canonical.sysdef.file}"/>
   346     <echo message="canno-file:${canonical.sysdef.file}"/>
   310     <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   347     <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   321       </filterchain>
   358       </filterchain>
   322     </copy>
   359     </copy>
   323     <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
   360     <delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
   324   </target>
   361   </target>
   325 
   362 
       
   363     <target name="sf-preprocess-package-config">
       
   364         <mkdir dir="${sf.common.config.dir}/generated"/>
       
   365         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
       
   366             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
       
   367             <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   368             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
       
   369             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   370         </exec>
       
   371     </target>
       
   372     
       
   373     <target name="sf-zip-content" depends="preprocess-zip-config">
       
   374         <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
       
   375         <property name="zips.${zip.target.name}.spec.name" value="${zip.target.name}" />
       
   376         <hlm:zipContentMacro type="${zip.target.name}" file="${zip.config.file}" />
       
   377     </target>
       
   378     
       
   379     <target name="sf-package-source" depends="sf-preprocess-package-config">
       
   380         <antcall target="sf-zip-content">
       
   381             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   382             <param name="zip.target.name" value="src" />
       
   383         </antcall>
       
   384     </target>
       
   385     
       
   386     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
       
   387         <!--antcall target="sf-zip-content">
       
   388             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   389             <param name="zip.target.name" value="bin" />
       
   390         </antcall-->
       
   391 
       
   392         <if><available file="${build.drive}/rnd_excludefile.txt" />
       
   393         <then>
       
   394             <echo message="Packaging with exclude list"/>
       
   395             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   396             <arg value="a"/>
       
   397             <arg value="-tzip"/>
       
   398             <arg value="-x@${build.drive}/rnd_excludefile.txt"/> <!-- excludes -->
       
   399             <arg value="-x!epoc32\build"/> 
       
   400             <arg value="-xr!*.sym"/> 
       
   401             <arg value="binaries_epoc.zip"/> 
       
   402             <arg value="epoc32\"/>
       
   403             </exec>
       
   404             <move file="${build.drive}/rnd_excludefile.txt" todir="${build.log.dir}/"/>
       
   405         </then>
       
   406         <else>
       
   407             <echo message="Packaging without exclude list"/>
       
   408             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   409             <arg value="a"/>
       
   410             <arg value="-tzip"/>
       
   411             <arg value="-x!epoc32\build"/> <!-- excludes -->
       
   412             <arg value="-xr!*.sym"/> 
       
   413             <arg value="binaries_epoc.zip"/> 
       
   414             <arg value="epoc32\"/>
       
   415         </exec>
       
   416         </else>
       
   417         </if>
       
   418         <if><available file="${build.drive}/binaries_epoc.zip"/>
       
   419         <then><move file="${build.drive}/binaries_epoc.zip" todir="${build.drive}/output/zips/"/></then>
       
   420         </if>
       
   421     </target>
       
   422 
       
   423     <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
       
   424 
       
   425         <!-- zip any RnD _includefile.txt files generated during source packaging -->
       
   426         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zip_postbuild.log">
       
   427             <arg value="${sf.common.config.dir}/tools/zip_includefiles.pl"/>
       
   428         </exec>
       
   429         <!-- cleanup my moving includefiles to logs and zips to zips\postbuild -->
       
   430         <move todir="${build.log.dir}">
       
   431            <fileset dir="${build.drive}"><include name="*_includefile.txt"/></fileset>
       
   432         </move>
       
   433         <move todir="${build.drive}/output/zips/postbuild">
       
   434            <fileset dir="${build.drive}"><include name="bin_rnd_*.zip"/></fileset>
       
   435         </move>
       
   436         <!-- TODO: merge with release_metadata.xml ? -->
       
   437     </target>
       
   438 
       
   439     <!-- unpack rnd zips if available -->
       
   440     <target name="sf-unpack-rnd">
       
   441         <echo message="Unpacking any available RnD binaries"/>
       
   442         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log">
       
   443         <arg value="x"/>
       
   444         <arg value="${build.drive}/output/zips/bin_rnd*.zip"/>
       
   445         </exec>
       
   446     </target>
       
   447     
       
   448     <target name ="sf-make-junction">
       
   449         
       
   450         <mkdir dir="${sf.spec.test.epocroot}"/>
       
   451 
       
   452         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_make_junction.log">
       
   453         <arg value="make_junction.pl"/>
       
   454         <arg value="--link=${sf.spec.test.epocroot}/epoc32"/>
       
   455         <arg value="--target=${build.drive}/epoc32"/>
       
   456         <arg value="--force"/>
       
   457       </exec>
       
   458     </target>
       
   459 
       
   460     <target name ="sf-delete-junction">
       
   461         <exec executable="junction.exe" dir="${sf.spec.test.epocroot}" failonerror="false" output="${build.log.dir}/ATS_${build.id}_delete_junction.log">
       
   462         <arg value="-d"/>
       
   463         <arg value="epoc32"/>
       
   464       </exec>
       
   465     </target>  
       
   466     
       
   467     <target name="sf-send-testpkg" depends="sf-make-junction">
       
   468         <mkdir dir="${sf.spec.test.package.droppath}"/>
       
   469         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
       
   470         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
       
   471             <arg value="ats3_testdrop.pl"/>
       
   472             <arg value="--host=${sf.spec.test.host.name}"/>
       
   473             <arg value="--username=${sf.spec.test.host.username}"/>
       
   474             <arg value="--password=${sf.spec.test.host.password}"/>
       
   475             <arg value="--local-test-pkg=${sf.spec.test.package.name}"/>
       
   476             <arg value="--local-drop-path=${sf.spec.test.package.droppath}"/>
       
   477             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
       
   478         </exec>
       
   479     </target>
       
   480   
       
   481     <!-- runs analysis of missing bins and source -->
       
   482     <target name="sf-run-analysis">
       
   483         <mkdir dir="${build.log.dir}/analysis"/>
       
   484 
       
   485         <echo message="Running source analysis of ANT output"/>
       
   486         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
       
   487             <arg value="${sf.common.config.dir}/tools/analysis/scan_antlogs.pl"/>
       
   488             <arg value="*ant*"/>
       
   489         </exec>
       
   490 
       
   491         <echo message="Running list analysis"/>
       
   492         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
       
   493             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
       
   494             <arg value="..\"/>
       
   495         </exec>
       
   496 
       
   497         <echo message="Running whatlog analysis"/>
       
   498         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
       
   499             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
       
   500             <arg value="..\"/>
       
   501         </exec>
       
   502 
       
   503         <echo message="Running summary analysis"/>
       
   504         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
       
   505             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
       
   506             <arg value="${build.id}_what_results.csv"/>
       
   507             <arg value="${build.id}_list_results.log"/>
       
   508         </exec>
       
   509 
       
   510         <echo message="Running collision analysis"/>
       
   511         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
       
   512             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
       
   513             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
       
   514         </exec>
       
   515     </target>
       
   516   
   326 </project>
   517 </project>
   327 
   518 
   328