common/build.xml
changeset 361 023e28d6bf31
parent 360 38e924ed959d
child 365 95e054b2bec1
equal deleted inserted replaced
360:38e924ed959d 361:023e28d6bf31
   119                     data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   119                     data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
   120               </data>
   120               </data>
   121         </fmpp>
   121         </fmpp>
   122     </target>
   122     </target>
   123     
   123     
   124     <target name="sf-bc-check">
       
   125 
       
   126         <if><isset property="env.PDT_HOME"/>
       
   127         <then>
       
   128             <!-- create BC dir -->
       
   129             <mkdir dir="${build.log.dir}/BC"/>
       
   130 
       
   131             <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
       
   132             <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
       
   133             <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
       
   134             <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
       
   135             <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
       
   136             <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
       
   137 
       
   138             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   139                 <arg value="/c"/>
       
   140                 <arg value="echo"/>
       
   141                 <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
       
   142             </exec>
       
   143             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   144                 <arg value="/c"/>
       
   145                 <arg value="echo"/>
       
   146                 <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
       
   147             </exec>
       
   148             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   149                 <arg value="/c"/>
       
   150                 <arg value="echo"/>
       
   151                 <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
       
   152             </exec>
       
   153             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   154                 <arg value="/c"/>
       
   155                 <arg value="echo"/>
       
   156                 <arg value="CURRENT_NAME=${build.id}"/>
       
   157             </exec>
       
   158             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   159                 <arg value="/c"/>
       
   160                 <arg value="echo"/>
       
   161                 <arg value="CURRENT_SDK_DIR=${build.drive}"/>
       
   162             </exec>
       
   163             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   164                 <arg value="/c"/>
       
   165                 <arg value="echo"/>
       
   166                 <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
       
   167             </exec>
       
   168 
       
   169             <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
       
   170 
       
   171             <if><istrue value="${sf.spec.bccheck.enable.la}"/>
       
   172                 <then>
       
   173                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
       
   174                         <arg value="CheckBC.py"/>
       
   175                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   176                         <arg value="-la"/>
       
   177                         <arg value="-f"/>
       
   178                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   179                     </exec>
       
   180                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
       
   181                 </then>
       
   182             </if>
       
   183 
       
   184             <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
       
   185                 <then>
       
   186                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
       
   187                         <arg value="CheckBC.py"/>
       
   188                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   189                         <arg value="-ha"/>
       
   190                         <arg value="-f"/>
       
   191                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   192                     </exec>
       
   193                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
       
   194                 </then>
       
   195             </if>
       
   196 
       
   197             <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
       
   198                 <then>
       
   199                     <echo message="INFO Updating bctest package with test info"/>
       
   200                     <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
       
   201                         <arg value="ats_specialise_test_drop.pl"/>
       
   202                         <arg value="--test-drop-name=bctest-${build.id}"/> 
       
   203                         <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   204                         <arg value="--src=${sf.spec.test.package.location}\..\bctest\bctest.zip"/>
       
   205                         <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.bccheck.package.name}"/>
       
   206                     </exec>
       
   207                     <!-- Now ready to send to ATS3 -->
       
   208 
       
   209                     <antcall target="sf-send-testpkg" inheritAll="false">
       
   210                         <param name="sf.spec.test.package.name" value="${sf.spec.bccheck.package.name}"/>
       
   211                     </antcall>    
       
   212                 </then>
       
   213             </if>
       
   214         </then>
       
   215         <else>
       
   216             <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
       
   217         </else>
       
   218         </if>
       
   219     </target>
       
   220     
       
   221     <target name="generate-layers">
   124     <target name="generate-layers">
   222        <echo message="canno-file:${canonical.sysdef.file}"/>
   125        <echo message="canno-file:${canonical.sysdef.file}"/>
   223        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   126        <echo message="raptor-filters:raptor_${sysdef.configuration}"/>
   224 
   127 
   225        <!-- All we want is a sysdef with the config name appended, so just copy it -->
   128        <!-- All we want is a sysdef with the config name appended, so just copy it -->
   367           ant: antProperties()
   270           ant: antProperties()
   368         </data>
   271         </data>
   369       </fmpp>
   272       </fmpp>
   370     </target>
   273     </target>
   371     
   274     
   372     <target name="sf-postbuild">
       
   373         <echo>[SF-POSTBUILD]</echo>
       
   374         <parallel>                
       
   375         <!-- TAG SOURCE CODE -->
       
   376         <if>
       
   377             <istrue value="${sf.spec.tagafterbuild.enable}" />
       
   378             <then>
       
   379                 <echo message="Apply tag to the source code used in this build"/>
       
   380                 <runtarget target="sf-tag-hg-code"/>
       
   381             </then>
       
   382         </if>
       
   383         
       
   384         <if>
       
   385             <istrue value="${sf.spec.md5.enable}"/>
       
   386             <then>
       
   387                 <echo message="INFO Creating MD5s"/>
       
   388                 <runtarget target="sf-run-evalid"/>
       
   389             </then>
       
   390         </if>
       
   391         <if>
       
   392             <istrue value="${sf.spec.package.bin.enable}"/>
       
   393             <then>
       
   394                 <echo message="INFO Packaging Binaries"/>
       
   395                 <runtarget target="sf-package-binary"/>
       
   396                 <runtarget target="sf-package-tools"/>
       
   397 
       
   398                 <echo message="INFO Validate Zip files"/>
       
   399                 <runtarget target="sf-package-validate"/>
       
   400             </then>
       
   401         </if>
       
   402         <!-- run build analysis tools -->
       
   403         <runtarget target="sf-run-analysis"/>
       
   404         
       
   405         </parallel>
       
   406         
       
   407         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
       
   408             <then>
       
   409                 <runtarget target="sf-build-smoketestpkg"/>
       
   410                 <runtarget target="sf-send-testpkg"/>
       
   411             </then>
       
   412         </if>
       
   413 
       
   414 
       
   415         <runtarget target="sf-zip-logs"/>
       
   416 
       
   417         <!-- Do BC check -->
       
   418         <if><istrue value="${sf.spec.bccheck.enable}"/>
       
   419             <then>
       
   420                 <runtarget target="sf-bc-check"/>
       
   421             </then>
       
   422         </if>
       
   423 
       
   424         <!-- PUBLISH LOGS/REPORTS -->
       
   425         <if>
       
   426             <istrue value="${sf.spec.publish.enable}" />
       
   427             <then>
       
   428                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
       
   429                 <runtarget target="sf-publish"/>
       
   430             </then>
       
   431         </if>
       
   432     </target>
       
   433 
       
   434     <target name="sf-publish" depends="prep-publish">
       
   435         <copy todir="${publish.dir}" preservelastmodified="true" failonerror="false">
       
   436            <fileset dir="${build.log.dir}"><include name="*.zip"/></fileset>
       
   437         </copy>
       
   438     </target>
       
   439 
       
   440     <target name="sf-getenv-tools">
   275     <target name="sf-getenv-tools">
   441         <antcall target="preparation-getenv" inheritAll="false">
   276         <antcall target="preparation-getenv" inheritAll="false">
   442             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   277             <param name="base_release.path"           value="${sf.spec.toolsbaseline.location}"/>
   443             <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
   278             <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
   444         </antcall>
   279         </antcall>
   445     </target>
       
   446 
       
   447     <!-- package all logs into zipfile before publish -->
       
   448     <target name="sf-zip-logs">
       
   449         <if>
       
   450             <istrue value="${sf.spec.logs.zip.enable}"/>
       
   451             <then>
       
   452                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
       
   453                 <echo message="Zip log requested, zipping logs..."/>
       
   454                 <mkdir dir="${temp.log.dir}"/>
       
   455                 <zip destfile="${temp.log.dir}/build_logs.zip" basedir="${build.drive}"> 
       
   456                     <include name="output/logs/**"/>
       
   457                     <exclude name="output/logs/BOM/**"/>
       
   458                     <exclude name="output/logs/deliverables/**"/>
       
   459                     <exclude name="output/logs/releaseables/**"/>
       
   460                 </zip>
       
   461                 <zip destfile="${temp.log.dir}/build_BOM.zip">
       
   462                     <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/>
       
   463                     <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/>
       
   464                 </zip>
       
   465                 <move todir="${build.log.dir}">
       
   466                     <fileset dir="${temp.log.dir}"/>
       
   467                 </move>
       
   468             </then>
       
   469         </if>
       
   470     </target>
   280     </target>
   471 
   281 
   472     <!-- generate dir list using passed location and name 
   282     <!-- generate dir list using passed location and name 
   473     if a baseline list is available then generate deltas too -->
   283     if a baseline list is available then generate deltas too -->
   474 
   284 
   577     
   387     
   578     <target name="sf-get-source" depends="sf-generate-source-spec">
   388     <target name="sf-get-source" depends="sf-generate-source-spec">
   579         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   389         <ant antfile="${sf.common.config.dir}/generated/source-spec.ant.xml" />
   580     </target>
   390     </target>
   581     
   391     
   582     <target name="sf-tag-hg-code">
       
   583         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
       
   584         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
       
   585               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
       
   586             <data expandProperties="yes">
       
   587                 ant: antProperties()
       
   588                 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
       
   589             </data>
       
   590         </fmpp>
       
   591         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
       
   592     </target>
       
   593     
       
   594     <target name="sf-diamondize-bom">
   392     <target name="sf-diamondize-bom">
   595         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   393         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   596               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   394               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   597             <data expandProperties="yes">
   395             <data expandProperties="yes">
   598                 ant: antProperties()
   396                 ant: antProperties()
   647             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   445             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   648             <param name="zip.target.name" value="src-by-layer" />
   446             <param name="zip.target.name" value="src-by-layer" />
   649         </antcall>
   447         </antcall>
   650     </target>
   448     </target>
   651     
   449     
   652     <target name="sf-package-tools" depends="sf-preprocess-package-config">
       
   653         <echo message="Packaging epoc32 tools - Temporary method"/>
       
   654         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
       
   655             <arg value="a"/>
       
   656             <arg value="-tzip"/>
       
   657             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   658 <!--            <arg value="-x@${build.log.dir}/*_includefile.txt"/> -->
       
   659             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/> 
       
   660             <arg value="epoc32/tools"/>
       
   661         </exec>
       
   662     </target>
       
   663     
       
   664     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
       
   665         <!-- Warning: Reverting to using the He zipper will also revert to a single zip for the binaries:
       
   666              would need to update the template and possibly the script that populates it -->
       
   667         <!--antcall target="sf-zip-content">
       
   668             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   669             <param name="zip.target.name" value="bin" />
       
   670         </antcall-->
       
   671     <parallel>
       
   672             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   673                 <arg value="a"/>
       
   674                 <arg value="-tzip"/>
       
   675                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   676                 <arg value="-x!epoc32\tools"/>
       
   677                 <arg value="-x!epoc32\build"/>
       
   678                 <arg value="-x!epoc32\release\armv5"/>
       
   679                 <arg value="-x!epoc32\release\winscw"/>
       
   680                 <arg value="-xr!*.sym"/>
       
   681                 <arg value="${build.drive}/output/zips/release/binaries_epoc.zip"/>
       
   682                 <arg value="epoc32\"/>
       
   683             </exec>
       
   684             
       
   685             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw.log">
       
   686                 <arg value="a"/>
       
   687                 <arg value="-tzip"/>
       
   688                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   689                 <arg value="-xr!*.sym"/>
       
   690                 <arg value="${build.drive}/output/zips/release/binaries_winscw.zip"/>
       
   691                 <arg value="epoc32\release\winscw\"/>
       
   692             </exec>
       
   693             
       
   694             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5.log">
       
   695                 <arg value="a"/>
       
   696                 <arg value="-tzip"/>
       
   697                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   698                 <arg value="-xr!*.sym"/>
       
   699                 <arg value="${build.drive}/output/zips/release/binaries_armv5.zip"/>
       
   700                 <arg value="epoc32\release\armv5\"/>
       
   701             </exec>
       
   702         </parallel>
       
   703     </target>
       
   704 
       
   705     <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
       
   706 
       
   707         <!-- zip any RnD _includefile.txt files generated during source packaging -->
       
   708         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zip_postbuild.log">
       
   709             <arg value="${sf.common.config.dir}/tools/zip_includefiles.pl"/>
       
   710         </exec>
       
   711         <!-- cleanup my moving includefiles to logs and zips to zips\release -->
       
   712         <move todir="${build.log.dir}">
       
   713            <fileset dir="${build.drive}"><include name="*_includefile.txt"/></fileset>
       
   714         </move>
       
   715         <move todir="${build.drive}/output/zips/release">
       
   716            <fileset dir="${build.drive}"><include name="bin*.zip"/></fileset>
       
   717         </move>
       
   718         <!-- TODO: merge with release_metadata.xml ? -->
       
   719     </target>
       
   720 
       
   721     <!-- unpack rnd zips if available -->
   450     <!-- unpack rnd zips if available -->
   722     <target name="sf-unpack-rnd">
   451     <target name="sf-unpack-rnd">
   723         <echo message="Unpacking any available RnD binaries"/>
   452         <echo message="Unpacking any available RnD binaries"/>
   724         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log">
   453         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/unzip_${build.id}_binaries_rnd.log">
   725         <arg value="x"/>
   454         <arg value="x"/>
   754         <arg value="-d"/>
   483         <arg value="-d"/>
   755         <arg value="epoc32"/>
   484         <arg value="epoc32"/>
   756       </exec>
   485       </exec>
   757     </target>  
   486     </target>  
   758         
   487         
   759     <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
       
   760         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   761         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
       
   762         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
       
   763             <arg value="ats3_testdrop.pl"/>
       
   764             <arg value="--host=${sf.spec.test.host.name}"/>
       
   765             <arg value="--username=${sf.spec.test.host.username}"/>
       
   766             <arg value="--password=${sf.spec.test.host.password}"/>
       
   767             <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
       
   768             <arg value="--local-drop-path=${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   769             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
       
   770         </exec>
       
   771     </target>
       
   772 
       
   773     <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
       
   774         <delete dir  ="${build.drive}/smoketest"/>
       
   775         <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
       
   776         
       
   777         <echo message="INFO Copy smoketest source to EPOCROOT"/>
       
   778         
       
   779         <copy todir="${build.drive}/smoketest">
       
   780             <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
       
   781         </copy>
       
   782         
       
   783         <echo message="INFO Building smoketest"/>
       
   784         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   785             <arg value="/c"/>
       
   786             <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
       
   787         </exec>
       
   788 
       
   789         <echo message="INFO Creating smoketest testpackage"/>
       
   790         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   791             <arg value="smoketest.pl"/>
       
   792         </exec>
       
   793         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
       
   794         
       
   795         <echo message="INFO Updating smoketest package with test info"/>
       
   796         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   797             <arg value="ats_specialise_test_drop.pl"/>
       
   798             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
       
   799             <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   800             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
       
   801             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
       
   802             <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>			
       
   803         </exec>
       
   804         <!-- Now ready to send to ATS3 -->
       
   805     </target>   
       
   806 
       
   807     <!-- runs analysis of missing bins and source -->
       
   808     <target name="sf-run-analysis">
       
   809         <mkdir dir="${build.log.dir}/analysis"/>
       
   810         <parallel>
       
   811           <runtarget target="sf-run-analysis-ant"/>
       
   812           <runtarget target="sf-run-analysis-raptor"/>
       
   813           <runtarget target="sf-run-analysis-yarp"/>
       
   814           <runtarget target="sf-run-analysis-whatlog-summary"/>
       
   815         </parallel>
       
   816         <if>
       
   817           <istrue value="${sf.spec.publish.enable}"/>
       
   818             <then>
       
   819             <runtarget target="sf-run-analysis-diamonds"/>
       
   820             </then>
       
   821         </if>    
       
   822     </target>
       
   823 
       
   824     <target name="sf-run-analysis-ant">    
       
   825         <echo message="Running source analysis of ANT output"/>
       
   826         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
       
   827             <arg value="${sf.common.config.dir}/tools/analysis/scan_antlogs.pl"/>
       
   828             <arg value="*ant*"/>
       
   829         </exec>
       
   830     </target>
       
   831 
       
   832     <target name="sf-run-analysis-list">    
       
   833         <echo message="Running list analysis"/>
       
   834         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
       
   835             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
       
   836             <arg value="..\"/>
       
   837         </exec>
       
   838     </target>
       
   839 
       
   840     <target name="sf-run-analysis-whatlog">    
       
   841         <echo message="Running whatlog analysis"/>
       
   842         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
       
   843             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
       
   844             <arg value="..\"/>
       
   845         </exec>
       
   846     </target>
       
   847 
       
   848     <target name="sf-run-analysis-whatlog-summary" >
       
   849         <sequential>
       
   850           <parallel>
       
   851             <runtarget target="sf-run-analysis-list"/>
       
   852             <runtarget target="sf-run-analysis-whatlog"/>
       
   853           </parallel>
       
   854           <runtarget target="sf-run-analysis-whatlog-merge" />
       
   855           <parallel>
       
   856             <runtarget target="sf-run-analysis-whatlog-package"/>
       
   857             <runtarget target="sf-run-analysis-whatlog-collisons"/>
       
   858           </parallel>
       
   859         </sequential>
       
   860     </target>
       
   861     
       
   862     <target name="sf-run-analysis-whatlog-merge" >        
       
   863         <echo message="Running summary analysis"/>
       
   864         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
       
   865             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
       
   866             <arg value="${build.id}_what_results.csv"/>
       
   867             <arg value="${build.id}_list_results.log"/>
       
   868             <arg value="${build.drive}/output/zips/release/binaries_epoc_additional.zip"/>
       
   869         </exec>
       
   870     </target>
       
   871     
       
   872     <target name="sf-run-analysis-whatlog-package" >        
       
   873         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
       
   874             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
       
   875             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   876             <arg value="${build.id}_what_results.csv_results.csv"/>
       
   877             <arg value="${sf.project.location}/sysdefs/system_model_os.xml"/>
       
   878         </exec>
       
   879     </target>
       
   880     
       
   881     <target name="sf-run-analysis-whatlog-collisons" >        
       
   882         <echo message="Running collision analysis"/>
       
   883         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
       
   884             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
       
   885             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
       
   886         </exec>
       
   887     </target>
       
   888 
       
   889     <target name="sf-run-analysis-raptor">            
       
   890       <echo message="Preprocessing *_compile.log files"/>
       
   891       <for param="logfile">
       
   892         <path>
       
   893           <fileset dir="${build.log.dir}">
       
   894             <include name="*_compile.log"/>
       
   895             <exclude name="*build_check_compile.log"/>
       
   896           </fileset>
       
   897         </path>
       
   898         <sequential>
       
   899           <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\|\/].*\.T?\d+_+(.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
       
   900 	        <echo message="Preprocessing @{logfile}..."/>
       
   901           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" input="@{logfile}" output="${build.log.dir}/analysis/${preprocessedlogfile}" error="${build.log.dir}/analysis/${build.id}_preprocess.log" append="true">
       
   902             <arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
       
   903           </exec>
       
   904         </sequential>
       
   905       </for>
       
   906       
       
   907       <echo message="Extracting whatlog information from *whatlog*_compile_preprocessed.log files"/>
       
   908       <for param="whatlogfile">
       
   909         <path>
       
   910           <fileset dir="${build.log.dir}/analysis">
       
   911             <include name="*whatlog*_compile_preprocessed.log"/>
       
   912           </fileset>
       
   913         </path>
       
   914         <sequential>
       
   915           <echo message="Extracting whatlog info from @{whatlogfile}..."/>
       
   916           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" append="true">
       
   917             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
       
   918             <arg value="--releaseable"/>
       
   919             <arg value="--log=@{whatlogfile}"/>
       
   920             <arg value="--basedir=${build.log.dir}"/>
       
   921             <arg value="--append"/>
       
   922           </exec>
       
   923         </sequential>
       
   924       </for>
       
   925       
       
   926       <echo message="Extracting error information from *_compile_preprocessed.log files"/>
       
   927       <for param="raptorlogfile">
       
   928         <path>
       
   929           <fileset dir="${build.log.dir}/analysis">
       
   930             <include name="*_compile_preprocessed.log"/>
       
   931           </fileset>
       
   932         </path>
       
   933         <sequential>
       
   934           <echo message="Extracting error info from @{raptorlogfile}..."/>
       
   935           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
       
   936             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
       
   937             <arg value="--error"/>
       
   938             <arg value="--log=@{raptorlogfile}"/>
       
   939             <arg value="--basedir=${build.log.dir}/raptorbits"/>
       
   940             <arg value="--append"/>
       
   941           </exec>
       
   942         </sequential>
       
   943       </for>
       
   944             <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
       
   945       <for param="tsv">
       
   946         <path>
       
   947           <fileset dir="${build.log.dir}/releaseables">
       
   948             <include name="**/*.tsv"/>
       
   949           </fileset>
       
   950         </path>
       
   951         <sequential>
       
   952           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   953             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   954           </exec>
       
   955         </sequential>
       
   956       </for>
       
   957     </target>
       
   958 
       
   959     <target name="sf-run-analysis-yarp">          
       
   960       <echo message="Running yarp over *_compile.log files"/>
       
   961       <for param="logfile">
       
   962         <path>
       
   963           <fileset dir="${build.log.dir}">
       
   964             <include name="*_compile.log"/>
       
   965             <exclude name="*build_check_compile.log"/>
       
   966           </fileset>
       
   967         </path>
       
   968         <sequential>
       
   969           <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
       
   970           <propertyregex override="yes" property="yarpfile_short"  input="${yarpfile}" regexp="[^_]*_[^_]*_[^_]*_(.+)_[^_]*_yarp\.csv" replace="YARP_\1"/>
       
   971           <echo message="Yarping @{logfile}..."/>
       
   972           <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${yarpfile}.log" append="true">
       
   973             <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
       
   974             <arg value="@{logfile}"/>
       
   975             <arg value="${build.log.dir}/analysis/${yarpfile}"/>
       
   976           </exec>
       
   977           <exec executable="cmd" output="${build.drive}/output/logs/analysis/tmp_yarp_files.csv" append="true">
       
   978             <arg value="/c"/>
       
   979             <arg value="echo"/>
       
   980             <arg value="${yarpfile_short},${sf.spec.publish.networkdrive}\${sf.spec.job.name}\builds\${sf.spec.job.codeline}\${build.id}\logs\analysis\${yarpfile},${build.drive}\output\logs\analysis\${yarpfile}"/>
       
   981           </exec>
       
   982         </sequential>
       
   983       </for>
       
   984       
       
   985       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
       
   986         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
       
   987         <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
       
   988       </exec>
       
   989       <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
       
   990     </target>
       
   991     
       
   992     <target name="sf-run-analysis-diamonds">      
       
   993       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
       
   994         <data expandProperties="yes">
       
   995           ant: antProperties()
       
   996           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
       
   997           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
       
   998         </data>
       
   999       </fmpp>
       
  1000     </target>
       
  1001     
       
  1002 
       
  1003 
       
  1004     <target name="sf-package-validate">
       
  1005         <exec executable="7z" dir="${build.drive}/output/zips" failonerror="false" output="${build.drive}/output/zips/validate.log">
       
  1006             <arg value="t"/>
       
  1007             <arg value="*.zip"/>
       
  1008         </exec>  
       
  1009         <exec executable="7z" dir="${build.drive}/output/zips/release" failonerror="false" output="${build.drive}/output/zips/release/validate.log">
       
  1010             <arg value="t"/>
       
  1011             <arg value="*.zip"/>
       
  1012         </exec>  
       
  1013     </target>
       
  1014 
       
  1015     <target name="sf-run-evalid">
       
  1016         <delete dir="${build.drive}/output/md5"/>
       
  1017         <mkdir  dir="${build.drive}/output/md5"/>
       
  1018 
       
  1019         <parallel>
       
  1020         <exec executable="cmd" dir="${build.drive}">
       
  1021             <arg value="/c"/>
       
  1022             <arg value="evalid -g epoc32/include output/md5/epoc32_include.md5"/>
       
  1023         </exec>
       
  1024         <exec executable="cmd" dir="${build.drive}">
       
  1025             <arg value="/c"/>
       
  1026             <arg value="evalid -g epoc32/s60 output/md5/epoc32_s60.md5"/>
       
  1027         </exec>
       
  1028         <exec executable="cmd" dir="${build.drive}">
       
  1029             <arg value="/c"/>
       
  1030             <arg value="evalid -g epoc32/localisation output/md5/epoc32_localisation.md5"/>
       
  1031         </exec>
       
  1032         <exec executable="cmd" dir="${build.drive}">
       
  1033             <arg value="/c"/>
       
  1034             <arg value="evalid -x \.sym$ -x ^armv5/udeb -x ^armv5/urel -x ^winscw/udeb -x ^winscw/urel -g epoc32/release output/md5/epoc32_release.md5"/>
       
  1035         </exec>
       
  1036         <exec executable="cmd" dir="${build.drive}">
       
  1037             <arg value="/c"/>
       
  1038             <arg value="evalid -x \.sym$ -g epoc32/release/armv5/udeb output/md5/epoc32_release_armv5_udeb.md5"/>
       
  1039         </exec>
       
  1040         <exec executable="cmd" dir="${build.drive}">
       
  1041             <arg value="/c"/>
       
  1042             <arg value="evalid -x \.sym$ -g epoc32/release/armv5/urel output/md5/epoc32_release_armv5_urel.md5"/>
       
  1043         </exec>
       
  1044         <exec executable="cmd" dir="${build.drive}">
       
  1045             <arg value="/c"/>
       
  1046             <arg value="evalid -x \.sym$ -g epoc32/release/winscw/udeb output/md5/epoc32_release_winscw_udeb.md5"/>
       
  1047         </exec>
       
  1048         <exec executable="cmd" dir="${build.drive}">
       
  1049             <arg value="/c"/>
       
  1050             <arg value="evalid -x \.sym$ -g epoc32/release/winscw/urel output/md5/epoc32_release_winscw_urel.md5"/>
       
  1051         </exec>
       
  1052         <exec executable="cmd" dir="${build.drive}">
       
  1053             <arg value="/c"/>
       
  1054             <arg value="evalid -g epoc32/cshlpcmp_template 	output/md5/epoc32_cshlpcmp_template.md5"/>
       
  1055         </exec>
       
  1056         <exec executable="cmd" dir="${build.drive}">
       
  1057             <arg value="/c"/>
       
  1058             <arg value="evalid -g epoc32/data output/md5/epoc32_data.md5"/>
       
  1059         </exec>
       
  1060         <exec executable="cmd" dir="${build.drive}">
       
  1061             <arg value="/c"/>
       
  1062             <arg value="evalid -g epoc32/engdoc output/md5/epoc32_engdoc.md5"/>
       
  1063         </exec>
       
  1064         <exec executable="cmd" dir="${build.drive}">
       
  1065             <arg value="/c"/>
       
  1066             <arg value="evalid -g epoc32/engineeringtools output/md5/epoc32_engineeringtools.md5"/>
       
  1067         </exec>
       
  1068         <exec executable="cmd" dir="${build.drive}">
       
  1069             <arg value="/c"/>
       
  1070             <arg value="evalid -g epoc32/gcc output/md5/epoc32_gcc.md5"/>
       
  1071         </exec>
       
  1072         <exec executable="cmd" dir="${build.drive}">
       
  1073             <arg value="/c"/>
       
  1074             <arg value="evalid -g epoc32/gcc_mingw output/md5/epoc32_gcc_mingw.md5"/>
       
  1075         </exec>
       
  1076         <exec executable="cmd" dir="${build.drive}">
       
  1077             <arg value="/c"/>
       
  1078             <arg value="evalid -g epoc32/ksa output/md5/epoc32_ksa.md5"/>
       
  1079         </exec>
       
  1080         <exec executable="cmd" dir="${build.drive}">
       
  1081             <arg value="/c"/>
       
  1082             <arg value="evalid -g epoc32/rom output/md5/epoc32_rom.md5"/>
       
  1083         </exec>
       
  1084         <exec executable="cmd" dir="${build.drive}">
       
  1085             <arg value="/c"/>
       
  1086             <arg value="evalid -g epoc32/rombuild output/md5/epoc32_rombuild.md5"/>
       
  1087         </exec>
       
  1088         <exec executable="cmd" dir="${build.drive}">
       
  1089             <arg value="/c"/>
       
  1090             <arg value="evalid -g epoc32/sbs_config output/md5/epoc32_sbs_config.md5"/>
       
  1091         </exec>
       
  1092         <exec executable="cmd" dir="${build.drive}">
       
  1093             <arg value="/c"/>
       
  1094             <arg value="evalid -g epoc32/sdk_special output/md5/epoc32_sdk_special.md5"/>
       
  1095         </exec>
       
  1096         <exec executable="cmd" dir="${build.drive}">
       
  1097             <arg value="/c"/>
       
  1098             <arg value="evalid -g epoc32/stdapis output/md5/epoc32_stdapis.md5"/>
       
  1099         </exec>
       
  1100         <exec executable="cmd" dir="${build.drive}">
       
  1101             <arg value="/c"/>
       
  1102             <arg value="evalid -g epoc32/stubs output/md5/epoc32_stubs.md5"/>
       
  1103         </exec>
       
  1104         <exec executable="cmd" dir="${build.drive}">
       
  1105             <arg value="/c"/>
       
  1106             <arg value="evalid -g epoc32/tools output/md5/epoc32_tools.md5"/>
       
  1107         </exec>
       
  1108         <exec executable="cmd" dir="${build.drive}">
       
  1109             <arg value="/c"/>
       
  1110             <arg value="evalid -g epoc32/wins output/md5/epoc32_wins.md5"/>
       
  1111         </exec>
       
  1112         <exec executable="cmd" dir="${build.drive}">
       
  1113             <arg value="/c"/>
       
  1114             <arg value="evalid -g epoc32/winscw output/md5/epoc32_winscw.md5"/>
       
  1115         </exec>
       
  1116         </parallel>
       
  1117         
       
  1118         <!-- package MD5s directly into epoc32/relinfo location so that its usable out-of-the-box -->
       
  1119         <property name="temp.md5.zip" value="${env.TEMP}/MD5_${sf.spec.job.name}_${build.number}.zip"/>
       
  1120         <echo message="INFO Packaging MD5s"/>
       
  1121         <zip destfile="${temp.md5.zip}">
       
  1122             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
       
  1123         </zip>
       
  1124         <move file="${temp.md5.zip}" todir="${build.log.dir}" failonerror="false"/>
       
  1125     </target>    
       
  1126 </project>
   488 </project>
  1127 
   489