common/build.postbuild.xml
changeset 365 95e054b2bec1
parent 361 023e28d6bf31
child 371 fcb6057a8009
equal deleted inserted replaced
364:4dc3b5b1577c 365:95e054b2bec1
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="SF-POSTBUILD" xmlns:hlm="http://www.nokia.com/helium">
       
     3     <target name="sf-postbuild">
       
     4         <echo>[SF-POSTBUILD]</echo>
       
     5         <parallel>                
       
     6         <!-- TAG SOURCE CODE -->
       
     7         <if>
       
     8             <istrue value="${sf.spec.tagafterbuild.enable}" />
       
     9             <then>
       
    10                 <echo message="Apply tag to the source code used in this build"/>
       
    11                 <runtarget target="sf-tag-hg-code"/>
       
    12             </then>
       
    13         </if>
       
    14         
       
    15         <if>
       
    16             <istrue value="${sf.spec.md5.enable}"/>
       
    17             <then>
       
    18                 <echo message="INFO Creating MD5s"/>
       
    19                 <runtarget target="sf-run-evalid"/>
       
    20             </then>
       
    21         </if>
       
    22         <if>
       
    23             <istrue value="${sf.spec.package.bin.enable}"/>
       
    24             <then>
       
    25                 <echo message="INFO Packaging Binaries"/>
       
    26                 <runtarget target="sf-package-binary"/>
       
    27                 <runtarget target="sf-package-tools"/>
       
    28 
       
    29                 <echo message="INFO Validate Zip files"/>
       
    30                 <runtarget target="sf-package-validate"/>
       
    31             </then>
       
    32         </if>
       
    33         <!-- run build analysis tools -->
       
    34         <runtarget target="sf-run-analysis"/>
       
    35         
       
    36         </parallel>
       
    37         
       
    38         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
       
    39             <then>
       
    40                 <runtarget target="sf-build-smoketestpkg"/>
       
    41                 <runtarget target="sf-send-testpkg"/>
       
    42             </then>
       
    43         </if>
       
    44 
       
    45 
       
    46         <runtarget target="sf-zip-logs"/>
       
    47 
       
    48         <!-- Do BC check -->
       
    49         <if><istrue value="${sf.spec.bccheck.enable}"/>
       
    50             <then>
       
    51                 <runtarget target="sf-bc-check"/>
       
    52             </then>
       
    53         </if>
       
    54 
       
    55         <!-- PUBLISH LOGS/REPORTS -->
       
    56         <if>
       
    57             <istrue value="${sf.spec.publish.enable}" />
       
    58             <then>
       
    59                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
       
    60                 <runtarget target="sf-publish"/>
       
    61             </then>
       
    62         </if>
       
    63     </target>
       
    64 
       
    65     <target name="sf-tag-hg-code">
       
    66         <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
       
    67         <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl"
       
    68               outputFile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml">
       
    69             <data expandProperties="yes">
       
    70                 ant: antProperties()
       
    71                 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','})
       
    72             </data>
       
    73         </fmpp>
       
    74         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
       
    75     </target>
       
    76 
       
    77     <target name="sf-run-evalid">
       
    78         <delete dir="${build.drive}/output/md5"/>
       
    79         <mkdir  dir="${build.drive}/output/md5"/>
       
    80 
       
    81         <parallel>
       
    82         <exec executable="cmd" dir="${build.drive}">
       
    83             <arg value="/c"/>
       
    84             <arg value="evalid -g epoc32/include output/md5/epoc32_include.md5"/>
       
    85         </exec>
       
    86         <exec executable="cmd" dir="${build.drive}">
       
    87             <arg value="/c"/>
       
    88             <arg value="evalid -g epoc32/s60 output/md5/epoc32_s60.md5"/>
       
    89         </exec>
       
    90         <exec executable="cmd" dir="${build.drive}">
       
    91             <arg value="/c"/>
       
    92             <arg value="evalid -g epoc32/localisation output/md5/epoc32_localisation.md5"/>
       
    93         </exec>
       
    94         <exec executable="cmd" dir="${build.drive}">
       
    95             <arg value="/c"/>
       
    96             <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"/>
       
    97         </exec>
       
    98         <exec executable="cmd" dir="${build.drive}">
       
    99             <arg value="/c"/>
       
   100             <arg value="evalid -x \.sym$ -g epoc32/release/armv5/udeb output/md5/epoc32_release_armv5_udeb.md5"/>
       
   101         </exec>
       
   102         <exec executable="cmd" dir="${build.drive}">
       
   103             <arg value="/c"/>
       
   104             <arg value="evalid -x \.sym$ -g epoc32/release/armv5/urel output/md5/epoc32_release_armv5_urel.md5"/>
       
   105         </exec>
       
   106         <exec executable="cmd" dir="${build.drive}">
       
   107             <arg value="/c"/>
       
   108             <arg value="evalid -x \.sym$ -g epoc32/release/winscw/udeb output/md5/epoc32_release_winscw_udeb.md5"/>
       
   109         </exec>
       
   110         <exec executable="cmd" dir="${build.drive}">
       
   111             <arg value="/c"/>
       
   112             <arg value="evalid -x \.sym$ -g epoc32/release/winscw/urel output/md5/epoc32_release_winscw_urel.md5"/>
       
   113         </exec>
       
   114         <exec executable="cmd" dir="${build.drive}">
       
   115             <arg value="/c"/>
       
   116             <arg value="evalid -g epoc32/cshlpcmp_template 	output/md5/epoc32_cshlpcmp_template.md5"/>
       
   117         </exec>
       
   118         <exec executable="cmd" dir="${build.drive}">
       
   119             <arg value="/c"/>
       
   120             <arg value="evalid -g epoc32/data output/md5/epoc32_data.md5"/>
       
   121         </exec>
       
   122         <exec executable="cmd" dir="${build.drive}">
       
   123             <arg value="/c"/>
       
   124             <arg value="evalid -g epoc32/engdoc output/md5/epoc32_engdoc.md5"/>
       
   125         </exec>
       
   126         <exec executable="cmd" dir="${build.drive}">
       
   127             <arg value="/c"/>
       
   128             <arg value="evalid -g epoc32/engineeringtools output/md5/epoc32_engineeringtools.md5"/>
       
   129         </exec>
       
   130         <exec executable="cmd" dir="${build.drive}">
       
   131             <arg value="/c"/>
       
   132             <arg value="evalid -g epoc32/gcc output/md5/epoc32_gcc.md5"/>
       
   133         </exec>
       
   134         <exec executable="cmd" dir="${build.drive}">
       
   135             <arg value="/c"/>
       
   136             <arg value="evalid -g epoc32/gcc_mingw output/md5/epoc32_gcc_mingw.md5"/>
       
   137         </exec>
       
   138         <exec executable="cmd" dir="${build.drive}">
       
   139             <arg value="/c"/>
       
   140             <arg value="evalid -g epoc32/ksa output/md5/epoc32_ksa.md5"/>
       
   141         </exec>
       
   142         <exec executable="cmd" dir="${build.drive}">
       
   143             <arg value="/c"/>
       
   144             <arg value="evalid -g epoc32/rom output/md5/epoc32_rom.md5"/>
       
   145         </exec>
       
   146         <exec executable="cmd" dir="${build.drive}">
       
   147             <arg value="/c"/>
       
   148             <arg value="evalid -g epoc32/rombuild output/md5/epoc32_rombuild.md5"/>
       
   149         </exec>
       
   150         <exec executable="cmd" dir="${build.drive}">
       
   151             <arg value="/c"/>
       
   152             <arg value="evalid -g epoc32/sbs_config output/md5/epoc32_sbs_config.md5"/>
       
   153         </exec>
       
   154         <exec executable="cmd" dir="${build.drive}">
       
   155             <arg value="/c"/>
       
   156             <arg value="evalid -g epoc32/sdk_special output/md5/epoc32_sdk_special.md5"/>
       
   157         </exec>
       
   158         <exec executable="cmd" dir="${build.drive}">
       
   159             <arg value="/c"/>
       
   160             <arg value="evalid -g epoc32/stdapis output/md5/epoc32_stdapis.md5"/>
       
   161         </exec>
       
   162         <exec executable="cmd" dir="${build.drive}">
       
   163             <arg value="/c"/>
       
   164             <arg value="evalid -g epoc32/stubs output/md5/epoc32_stubs.md5"/>
       
   165         </exec>
       
   166         <exec executable="cmd" dir="${build.drive}">
       
   167             <arg value="/c"/>
       
   168             <arg value="evalid -g epoc32/tools output/md5/epoc32_tools.md5"/>
       
   169         </exec>
       
   170         <exec executable="cmd" dir="${build.drive}">
       
   171             <arg value="/c"/>
       
   172             <arg value="evalid -g epoc32/wins output/md5/epoc32_wins.md5"/>
       
   173         </exec>
       
   174         <exec executable="cmd" dir="${build.drive}">
       
   175             <arg value="/c"/>
       
   176             <arg value="evalid -g epoc32/winscw output/md5/epoc32_winscw.md5"/>
       
   177         </exec>
       
   178         </parallel>
       
   179         
       
   180         <!-- package MD5s directly into epoc32/relinfo location so that its usable out-of-the-box -->
       
   181         <property name="temp.md5.zip" value="${env.TEMP}/MD5_${sf.spec.job.name}_${build.number}.zip"/>
       
   182         <echo message="INFO Packaging MD5s"/>
       
   183         <zip destfile="${temp.md5.zip}">
       
   184             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
       
   185         </zip>
       
   186         <move file="${temp.md5.zip}" todir="${build.log.dir}" failonerror="false"/>
       
   187     </target>    
       
   188     
       
   189     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
       
   190         <!-- Warning: Reverting to using the He zipper will also revert to a single zip for the binaries:
       
   191              would need to update the template and possibly the script that populates it -->
       
   192         <!--antcall target="sf-zip-content">
       
   193             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   194             <param name="zip.target.name" value="bin" />
       
   195         </antcall-->
       
   196         <parallel>
       
   197             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   198                 <arg value="a"/>
       
   199                 <arg value="-tzip"/>
       
   200                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   201                 <arg value="-x!epoc32\tools"/>
       
   202                 <arg value="-x!epoc32\build"/>
       
   203                 <arg value="-x!epoc32\release\armv5"/>
       
   204                 <arg value="-x!epoc32\release\winscw"/>
       
   205                 <arg value="-xr!*.sym"/>
       
   206                 <arg value="${build.drive}/output/zips/release/binaries_epoc.zip"/>
       
   207                 <arg value="epoc32\"/>
       
   208             </exec>
       
   209             
       
   210             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw.log">
       
   211                 <arg value="a"/>
       
   212                 <arg value="-tzip"/>
       
   213                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   214                 <arg value="-xr!*.sym"/>
       
   215                 <arg value="${build.drive}/output/zips/release/binaries_winscw.zip"/>
       
   216                 <arg value="epoc32\release\winscw\"/>
       
   217             </exec>
       
   218             
       
   219             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5.log">
       
   220                 <arg value="a"/>
       
   221                 <arg value="-tzip"/>
       
   222                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   223                 <arg value="-xr!*.sym"/>
       
   224                 <arg value="${build.drive}/output/zips/release/binaries_armv5.zip"/>
       
   225                 <arg value="epoc32\release\armv5\"/>
       
   226             </exec>
       
   227         </parallel>
       
   228     </target>
       
   229 
       
   230     <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
       
   231 
       
   232         <!-- zip any RnD _includefile.txt files generated during source packaging -->
       
   233         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zip_postbuild.log">
       
   234             <arg value="${sf.common.config.dir}/tools/zip_includefiles.pl"/>
       
   235         </exec>
       
   236         <!-- cleanup my moving includefiles to logs and zips to zips\release -->
       
   237         <move todir="${build.log.dir}">
       
   238             <fileset dir="${build.drive}"><include name="*_includefile.txt"/></fileset>
       
   239         </move>
       
   240         <move todir="${build.drive}/output/zips/release">
       
   241             <fileset dir="${build.drive}"><include name="bin*.zip"/></fileset>
       
   242         </move>
       
   243         <!-- TODO: merge with release_metadata.xml ? -->
       
   244     </target>
       
   245 
       
   246     <target name="sf-package-tools" depends="sf-preprocess-package-config">
       
   247         <echo message="Packaging epoc32 tools - Temporary method"/>
       
   248         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
       
   249             <arg value="a"/>
       
   250             <arg value="-tzip"/>
       
   251             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
       
   252 <!--            <arg value="-x@${build.log.dir}/*_includefile.txt"/> -->
       
   253             <arg value="${build.drive}/output/zips/release/tools_epoc.zip"/> 
       
   254             <arg value="epoc32/tools"/>
       
   255         </exec>
       
   256     </target>
       
   257     
       
   258     <target name="sf-package-validate">
       
   259         <exec executable="7z" dir="${build.drive}/output/zips" failonerror="false" output="${build.drive}/output/zips/validate.log">
       
   260             <arg value="t"/>
       
   261             <arg value="*.zip"/>
       
   262         </exec>  
       
   263         <exec executable="7z" dir="${build.drive}/output/zips/release" failonerror="false" output="${build.drive}/output/zips/release/validate.log">
       
   264             <arg value="t"/>
       
   265             <arg value="*.zip"/>
       
   266         </exec>  
       
   267     </target>
       
   268 
       
   269     <!-- runs analysis of missing bins and source -->
       
   270     <target name="sf-run-analysis">
       
   271         <mkdir dir="${build.log.dir}/analysis"/>
       
   272         <parallel>
       
   273           <runtarget target="sf-run-analysis-ant"/>
       
   274           <runtarget target="sf-run-analysis-raptor"/>
       
   275           <runtarget target="sf-run-analysis-yarp"/>
       
   276           <runtarget target="sf-run-analysis-whatlog-summary"/>
       
   277         </parallel>
       
   278         <if>
       
   279           <istrue value="${sf.spec.publish.enable}"/>
       
   280             <then>
       
   281             <runtarget target="sf-run-analysis-diamonds"/>
       
   282             </then>
       
   283         </if>    
       
   284     </target>
       
   285 
       
   286     <target name="sf-run-analysis-ant">    
       
   287         <echo message="Running source analysis of ANT output"/>
       
   288         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
       
   289             <arg value="${sf.common.config.dir}/tools/analysis/scan_antlogs.pl"/>
       
   290             <arg value="*ant*"/>
       
   291         </exec>
       
   292     </target>
       
   293 
       
   294     <target name="sf-run-analysis-raptor">            
       
   295       <echo message="Preprocessing *_compile.log files"/>
       
   296       <for param="logfile">
       
   297         <path>
       
   298           <fileset dir="${build.log.dir}">
       
   299             <include name="*_compile.log"/>
       
   300             <exclude name="*build_check_compile.log"/>
       
   301           </fileset>
       
   302         </path>
       
   303         <sequential>
       
   304           <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\|\/].*\.T?\d+_+(.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
       
   305 	        <echo message="Preprocessing @{logfile}..."/>
       
   306           <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">
       
   307             <arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
       
   308           </exec>
       
   309         </sequential>
       
   310       </for>
       
   311       
       
   312       <echo message="Extracting whatlog information from *whatlog*_compile_preprocessed.log files"/>
       
   313       <for param="whatlogfile">
       
   314         <path>
       
   315           <fileset dir="${build.log.dir}/analysis">
       
   316             <include name="*whatlog*_compile_preprocessed.log"/>
       
   317           </fileset>
       
   318         </path>
       
   319         <sequential>
       
   320           <echo message="Extracting whatlog info from @{whatlogfile}..."/>
       
   321           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" append="true">
       
   322             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
       
   323             <arg value="--releaseable"/>
       
   324             <arg value="--log=@{whatlogfile}"/>
       
   325             <arg value="--basedir=${build.log.dir}"/>
       
   326             <arg value="--append"/>
       
   327           </exec>
       
   328         </sequential>
       
   329       </for>
       
   330       
       
   331       <echo message="Extracting error information from *_compile_preprocessed.log files"/>
       
   332       <for param="raptorlogfile">
       
   333         <path>
       
   334           <fileset dir="${build.log.dir}/analysis">
       
   335             <include name="*_compile_preprocessed.log"/>
       
   336           </fileset>
       
   337         </path>
       
   338         <sequential>
       
   339           <echo message="Extracting error info from @{raptorlogfile}..."/>
       
   340           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
       
   341             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
       
   342             <arg value="--error"/>
       
   343             <arg value="--warning"/>
       
   344             <arg value="--log=@{raptorlogfile}"/>
       
   345             <arg value="--basedir=${build.log.dir}/raptorbits"/>
       
   346             <arg value="--append"/>
       
   347           </exec>
       
   348         </sequential>
       
   349       </for>
       
   350             <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
       
   351       <for param="tsv">
       
   352         <path>
       
   353           <fileset dir="${build.log.dir}/releaseables">
       
   354             <include name="**/*.tsv"/>
       
   355           </fileset>
       
   356         </path>
       
   357         <sequential>
       
   358           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   359             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   360           </exec>
       
   361         </sequential>
       
   362       </for>
       
   363     </target>
       
   364 
       
   365     <target name="sf-run-analysis-yarp">          
       
   366       <echo message="Running yarp over *_compile.log files"/>
       
   367       <for param="logfile">
       
   368         <path>
       
   369           <fileset dir="${build.log.dir}">
       
   370             <include name="*_compile.log"/>
       
   371             <exclude name="*build_check_compile.log"/>
       
   372           </fileset>
       
   373         </path>
       
   374         <sequential>
       
   375           <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
       
   376           <propertyregex override="yes" property="yarpfile_short"  input="${yarpfile}" regexp="[^_]*_[^_]*_[^_]*_(.+)_[^_]*_yarp\.csv" replace="YARP_\1"/>
       
   377           <echo message="Yarping @{logfile}..."/>
       
   378           <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${yarpfile}.log" append="true">
       
   379             <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
       
   380             <arg value="@{logfile}"/>
       
   381             <arg value="${build.log.dir}/analysis/${yarpfile}"/>
       
   382           </exec>
       
   383           <exec executable="cmd" output="${build.drive}/output/logs/analysis/tmp_yarp_files.csv" append="true">
       
   384             <arg value="/c"/>
       
   385             <arg value="echo"/>
       
   386             <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}"/>
       
   387           </exec>
       
   388         </sequential>
       
   389       </for>
       
   390       
       
   391       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
       
   392         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
       
   393         <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
       
   394       </exec>
       
   395       <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
       
   396     </target>
       
   397     
       
   398     <target name="sf-run-analysis-whatlog-summary" >
       
   399         <sequential>
       
   400           <parallel>
       
   401             <runtarget target="sf-run-analysis-list"/>
       
   402             <runtarget target="sf-run-analysis-whatlog"/>
       
   403           </parallel>
       
   404           <runtarget target="sf-run-analysis-whatlog-merge" />
       
   405           <parallel>
       
   406             <runtarget target="sf-run-analysis-whatlog-package"/>
       
   407             <runtarget target="sf-run-analysis-whatlog-collisons"/>
       
   408           </parallel>
       
   409         </sequential>
       
   410     </target>
       
   411     
       
   412     <target name="sf-run-analysis-list">    
       
   413         <echo message="Running list analysis"/>
       
   414         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
       
   415             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
       
   416             <arg value="..\"/>
       
   417         </exec>
       
   418     </target>
       
   419 
       
   420     <target name="sf-run-analysis-whatlog">    
       
   421         <echo message="Running whatlog analysis"/>
       
   422         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
       
   423             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
       
   424             <arg value="..\"/>
       
   425         </exec>
       
   426     </target>
       
   427 
       
   428     <target name="sf-run-analysis-whatlog-merge" >        
       
   429         <echo message="Running summary analysis"/>
       
   430         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
       
   431             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
       
   432             <arg value="${build.id}_what_results.csv"/>
       
   433             <arg value="${build.id}_list_results.log"/>
       
   434             <arg value="${build.drive}/output/zips/release/binaries_epoc_additional.zip"/>
       
   435         </exec>
       
   436     </target>
       
   437     
       
   438     <target name="sf-run-analysis-whatlog-package" >        
       
   439         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
       
   440             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
       
   441             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   442             <arg value="${build.id}_what_results.csv_results.csv"/>
       
   443             <arg value="${sf.project.location}/sysdefs/system_model_os.xml"/>
       
   444         </exec>
       
   445     </target>
       
   446     
       
   447     <target name="sf-run-analysis-whatlog-collisons" >        
       
   448         <echo message="Running collision analysis"/>
       
   449         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
       
   450             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
       
   451             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
       
   452         </exec>
       
   453     </target>
       
   454 
       
   455     <target name="sf-run-analysis-diamonds">      
       
   456       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
       
   457         <data expandProperties="yes">
       
   458           ant: antProperties()
       
   459           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
       
   460           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
       
   461         </data>
       
   462       </fmpp>
       
   463     </target>
       
   464 
       
   465     <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
       
   466         <delete dir  ="${build.drive}/smoketest"/>
       
   467         <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
       
   468         
       
   469         <echo message="INFO Copy smoketest source to EPOCROOT"/>
       
   470         
       
   471         <copy todir="${build.drive}/smoketest">
       
   472             <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
       
   473         </copy>
       
   474         
       
   475         <echo message="INFO Building smoketest"/>
       
   476         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   477             <arg value="/c"/>
       
   478             <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
       
   479         </exec>
       
   480 
       
   481         <echo message="INFO Creating smoketest testpackage"/>
       
   482         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   483             <arg value="smoketest.pl"/>
       
   484         </exec>
       
   485         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
       
   486         
       
   487         <echo message="INFO Updating smoketest package with test info"/>
       
   488         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   489             <arg value="ats_specialise_test_drop.pl"/>
       
   490             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
       
   491             <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   492             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
       
   493             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
       
   494             <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>			
       
   495         </exec>
       
   496         <!-- Now ready to send to ATS3 -->
       
   497     </target>   
       
   498 
       
   499     <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
       
   500         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   501         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
       
   502         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
       
   503             <arg value="ats3_testdrop.pl"/>
       
   504             <arg value="--host=${sf.spec.test.host.name}"/>
       
   505             <arg value="--username=${sf.spec.test.host.username}"/>
       
   506             <arg value="--password=${sf.spec.test.host.password}"/>
       
   507             <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
       
   508             <arg value="--local-drop-path=${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   509             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
       
   510         </exec>
       
   511     </target>
       
   512 
       
   513     <!-- package all logs into zipfile before publish -->
       
   514     <target name="sf-zip-logs">
       
   515         <if>
       
   516             <istrue value="${sf.spec.logs.zip.enable}"/>
       
   517             <then>
       
   518                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
       
   519                 <echo message="Zip log requested, zipping logs..."/>
       
   520                 <mkdir dir="${temp.log.dir}"/>
       
   521                 <zip destfile="${temp.log.dir}/build_logs.zip" basedir="${build.drive}"> 
       
   522                     <include name="output/logs/**"/>
       
   523                     <exclude name="output/logs/BOM/**"/>
       
   524                     <exclude name="output/logs/deliverables/**"/>
       
   525                     <exclude name="output/logs/releaseables/**"/>
       
   526                 </zip>
       
   527                 <zip destfile="${temp.log.dir}/build_BOM.zip">
       
   528                     <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/>
       
   529                     <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/>
       
   530                 </zip>
       
   531                 <move todir="${build.log.dir}">
       
   532                     <fileset dir="${temp.log.dir}"/>
       
   533                 </move>
       
   534             </then>
       
   535         </if>
       
   536     </target>
       
   537 
       
   538     <target name="sf-bc-check">
       
   539 
       
   540         <if><isset property="env.PDT_HOME"/>
       
   541         <then>
       
   542             <!-- create BC dir -->
       
   543             <mkdir dir="${build.log.dir}/BC"/>
       
   544 
       
   545             <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
       
   546             <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
       
   547             <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
       
   548             <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
       
   549             <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
       
   550             <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
       
   551 
       
   552             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   553                 <arg value="/c"/>
       
   554                 <arg value="echo"/>
       
   555                 <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
       
   556             </exec>
       
   557             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   558                 <arg value="/c"/>
       
   559                 <arg value="echo"/>
       
   560                 <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
       
   561             </exec>
       
   562             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   563                 <arg value="/c"/>
       
   564                 <arg value="echo"/>
       
   565                 <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
       
   566             </exec>
       
   567             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   568                 <arg value="/c"/>
       
   569                 <arg value="echo"/>
       
   570                 <arg value="CURRENT_NAME=${build.id}"/>
       
   571             </exec>
       
   572             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   573                 <arg value="/c"/>
       
   574                 <arg value="echo"/>
       
   575                 <arg value="CURRENT_SDK_DIR=${build.drive}"/>
       
   576             </exec>
       
   577             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   578                 <arg value="/c"/>
       
   579                 <arg value="echo"/>
       
   580                 <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
       
   581             </exec>
       
   582 
       
   583             <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
       
   584 
       
   585             <if><istrue value="${sf.spec.bccheck.enable.la}"/>
       
   586                 <then>
       
   587                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
       
   588                         <arg value="CheckBC.py"/>
       
   589                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   590                         <arg value="-la"/>
       
   591                         <arg value="-f"/>
       
   592                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   593                     </exec>
       
   594                     <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"/>
       
   595                 </then>
       
   596             </if>
       
   597 
       
   598             <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
       
   599                 <then>
       
   600                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
       
   601                         <arg value="CheckBC.py"/>
       
   602                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   603                         <arg value="-ha"/>
       
   604                         <arg value="-f"/>
       
   605                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   606                     </exec>
       
   607                     <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"/>
       
   608                 </then>
       
   609             </if>
       
   610 
       
   611             <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
       
   612                 <then>
       
   613                     <echo message="INFO Updating bctest package with test info"/>
       
   614                     <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
       
   615                         <arg value="ats_specialise_test_drop.pl"/>
       
   616                         <arg value="--test-drop-name=bctest-${build.id}"/> 
       
   617                         <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   618                         <arg value="--src=${sf.spec.test.package.location}\..\bctest\bctest.zip"/>
       
   619                         <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.bccheck.package.name}"/>
       
   620                     </exec>
       
   621                     <!-- Now ready to send to ATS3 -->
       
   622 
       
   623                     <antcall target="sf-send-testpkg" inheritAll="false">
       
   624                         <param name="sf.spec.test.package.name" value="${sf.spec.bccheck.package.name}"/>
       
   625                     </antcall>    
       
   626                 </then>
       
   627             </if>
       
   628         </then>
       
   629         <else>
       
   630             <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
       
   631         </else>
       
   632         </if>
       
   633     </target>
       
   634     
       
   635     <target name="sf-publish" depends="prep-publish">
       
   636         <copy todir="${publish.dir}" preservelastmodified="true" failonerror="false">
       
   637            <fileset dir="${build.log.dir}"><include name="*.zip"/></fileset>
       
   638         </copy>
       
   639     </target>
       
   640 
       
   641 </project>