common/build.postbuild.xml
changeset 361 023e28d6bf31
parent 360 38e924ed959d
child 365 95e054b2bec1
equal deleted inserted replaced
360:38e924ed959d 361:023e28d6bf31
     1 <?xml version="1.0" encoding="UTF-8"?>
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="SF-POSTBUILD" xmlns:hlm="http://www.nokia.com/helium">
     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="--log=@{raptorlogfile}"/>
       
   344             <arg value="--basedir=${build.log.dir}/raptorbits"/>
       
   345             <arg value="--append"/>
       
   346           </exec>
       
   347         </sequential>
       
   348       </for>
       
   349             <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
       
   350       <for param="tsv">
       
   351         <path>
       
   352           <fileset dir="${build.log.dir}/releaseables">
       
   353             <include name="**/*.tsv"/>
       
   354           </fileset>
       
   355         </path>
       
   356         <sequential>
       
   357           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   358             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   359           </exec>
       
   360         </sequential>
       
   361       </for>
       
   362     </target>
       
   363 
       
   364     <target name="sf-run-analysis-yarp">          
       
   365       <echo message="Running yarp over *_compile.log files"/>
       
   366       <for param="logfile">
       
   367         <path>
       
   368           <fileset dir="${build.log.dir}">
       
   369             <include name="*_compile.log"/>
       
   370             <exclude name="*build_check_compile.log"/>
       
   371           </fileset>
       
   372         </path>
       
   373         <sequential>
       
   374           <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
       
   375           <propertyregex override="yes" property="yarpfile_short"  input="${yarpfile}" regexp="[^_]*_[^_]*_[^_]*_(.+)_[^_]*_yarp\.csv" replace="YARP_\1"/>
       
   376           <echo message="Yarping @{logfile}..."/>
       
   377           <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${yarpfile}.log" append="true">
       
   378             <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
       
   379             <arg value="@{logfile}"/>
       
   380             <arg value="${build.log.dir}/analysis/${yarpfile}"/>
       
   381           </exec>
       
   382           <exec executable="cmd" output="${build.drive}/output/logs/analysis/tmp_yarp_files.csv" append="true">
       
   383             <arg value="/c"/>
       
   384             <arg value="echo"/>
       
   385             <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}"/>
       
   386           </exec>
       
   387         </sequential>
       
   388       </for>
       
   389       
       
   390       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
       
   391         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
       
   392         <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
       
   393       </exec>
       
   394       <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
       
   395     </target>
       
   396     
       
   397     <target name="sf-run-analysis-whatlog-summary" >
       
   398         <sequential>
       
   399           <parallel>
       
   400             <runtarget target="sf-run-analysis-list"/>
       
   401             <runtarget target="sf-run-analysis-whatlog"/>
       
   402           </parallel>
       
   403           <runtarget target="sf-run-analysis-whatlog-merge" />
       
   404           <parallel>
       
   405             <runtarget target="sf-run-analysis-whatlog-package"/>
       
   406             <runtarget target="sf-run-analysis-whatlog-collisons"/>
       
   407           </parallel>
       
   408         </sequential>
       
   409     </target>
       
   410     
       
   411     <target name="sf-run-analysis-list">    
       
   412         <echo message="Running list analysis"/>
       
   413         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
       
   414             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
       
   415             <arg value="..\"/>
       
   416         </exec>
       
   417     </target>
       
   418 
       
   419     <target name="sf-run-analysis-whatlog">    
       
   420         <echo message="Running whatlog analysis"/>
       
   421         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
       
   422             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
       
   423             <arg value="..\"/>
       
   424         </exec>
       
   425     </target>
       
   426 
       
   427     <target name="sf-run-analysis-whatlog-merge" >        
       
   428         <echo message="Running summary analysis"/>
       
   429         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
       
   430             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
       
   431             <arg value="${build.id}_what_results.csv"/>
       
   432             <arg value="${build.id}_list_results.log"/>
       
   433             <arg value="${build.drive}/output/zips/release/binaries_epoc_additional.zip"/>
       
   434         </exec>
       
   435     </target>
       
   436     
       
   437     <target name="sf-run-analysis-whatlog-package" >        
       
   438         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
       
   439             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
       
   440             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
       
   441             <arg value="${build.id}_what_results.csv_results.csv"/>
       
   442             <arg value="${sf.project.location}/sysdefs/system_model_os.xml"/>
       
   443         </exec>
       
   444     </target>
       
   445     
       
   446     <target name="sf-run-analysis-whatlog-collisons" >        
       
   447         <echo message="Running collision analysis"/>
       
   448         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
       
   449             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
       
   450             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
       
   451         </exec>
       
   452     </target>
       
   453 
       
   454     <target name="sf-run-analysis-diamonds">      
       
   455       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
       
   456         <data expandProperties="yes">
       
   457           ant: antProperties()
       
   458           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
       
   459           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
       
   460         </data>
       
   461       </fmpp>
       
   462     </target>
       
   463 
       
   464     <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
       
   465         <delete dir  ="${build.drive}/smoketest"/>
       
   466         <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
       
   467         
       
   468         <echo message="INFO Copy smoketest source to EPOCROOT"/>
       
   469         
       
   470         <copy todir="${build.drive}/smoketest">
       
   471             <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
       
   472         </copy>
       
   473         
       
   474         <echo message="INFO Building smoketest"/>
       
   475         <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   476             <arg value="/c"/>
       
   477             <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
       
   478         </exec>
       
   479 
       
   480         <echo message="INFO Creating smoketest testpackage"/>
       
   481         <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   482             <arg value="smoketest.pl"/>
       
   483         </exec>
       
   484         <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
       
   485         
       
   486         <echo message="INFO Updating smoketest package with test info"/>
       
   487         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
       
   488             <arg value="ats_specialise_test_drop.pl"/>
       
   489             <arg value="--test-drop-name=Smoketest-${build.id}"/> 
       
   490             <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   491             <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
       
   492             <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>	
       
   493             <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>			
       
   494         </exec>
       
   495         <!-- Now ready to send to ATS3 -->
       
   496     </target>   
       
   497 
       
   498     <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
       
   499         <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   500         <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
       
   501         <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
       
   502             <arg value="ats3_testdrop.pl"/>
       
   503             <arg value="--host=${sf.spec.test.host.name}"/>
       
   504             <arg value="--username=${sf.spec.test.host.username}"/>
       
   505             <arg value="--password=${sf.spec.test.host.password}"/>
       
   506             <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
       
   507             <arg value="--local-drop-path=${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
       
   508             <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
       
   509         </exec>
       
   510     </target>
       
   511 
       
   512     <!-- package all logs into zipfile before publish -->
       
   513     <target name="sf-zip-logs">
       
   514         <if>
       
   515             <istrue value="${sf.spec.logs.zip.enable}"/>
       
   516             <then>
       
   517                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
       
   518                 <echo message="Zip log requested, zipping logs..."/>
       
   519                 <mkdir dir="${temp.log.dir}"/>
       
   520                 <zip destfile="${temp.log.dir}/build_logs.zip" basedir="${build.drive}"> 
       
   521                     <include name="output/logs/**"/>
       
   522                     <exclude name="output/logs/BOM/**"/>
       
   523                     <exclude name="output/logs/deliverables/**"/>
       
   524                     <exclude name="output/logs/releaseables/**"/>
       
   525                 </zip>
       
   526                 <zip destfile="${temp.log.dir}/build_BOM.zip">
       
   527                     <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/>
       
   528                     <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/>
       
   529                 </zip>
       
   530                 <move todir="${build.log.dir}">
       
   531                     <fileset dir="${temp.log.dir}"/>
       
   532                 </move>
       
   533             </then>
       
   534         </if>
       
   535     </target>
       
   536 
       
   537     <target name="sf-bc-check">
       
   538 
       
   539         <if><isset property="env.PDT_HOME"/>
       
   540         <then>
       
   541             <!-- create BC dir -->
       
   542             <mkdir dir="${build.log.dir}/BC"/>
       
   543 
       
   544             <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
       
   545             <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
       
   546             <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
       
   547             <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
       
   548             <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
       
   549             <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
       
   550 
       
   551             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   552                 <arg value="/c"/>
       
   553                 <arg value="echo"/>
       
   554                 <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
       
   555             </exec>
       
   556             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   557                 <arg value="/c"/>
       
   558                 <arg value="echo"/>
       
   559                 <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
       
   560             </exec>
       
   561             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   562                 <arg value="/c"/>
       
   563                 <arg value="echo"/>
       
   564                 <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
       
   565             </exec>
       
   566             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   567                 <arg value="/c"/>
       
   568                 <arg value="echo"/>
       
   569                 <arg value="CURRENT_NAME=${build.id}"/>
       
   570             </exec>
       
   571             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   572                 <arg value="/c"/>
       
   573                 <arg value="echo"/>
       
   574                 <arg value="CURRENT_SDK_DIR=${build.drive}"/>
       
   575             </exec>
       
   576             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
       
   577                 <arg value="/c"/>
       
   578                 <arg value="echo"/>
       
   579                 <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
       
   580             </exec>
       
   581 
       
   582             <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
       
   583 
       
   584             <if><istrue value="${sf.spec.bccheck.enable.la}"/>
       
   585                 <then>
       
   586                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
       
   587                         <arg value="CheckBC.py"/>
       
   588                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   589                         <arg value="-la"/>
       
   590                         <arg value="-f"/>
       
   591                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   592                     </exec>
       
   593                     <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"/>
       
   594                 </then>
       
   595             </if>
       
   596 
       
   597             <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
       
   598                 <then>
       
   599                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
       
   600                         <arg value="CheckBC.py"/>
       
   601                         <arg value="${build.log.dir}/BC/bc.config"/>
       
   602                         <arg value="-ha"/>
       
   603                         <arg value="-f"/>
       
   604                         <arg value="${sf.spec.bccheck.reportid}"/>
       
   605                     </exec>
       
   606                     <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"/>
       
   607                 </then>
       
   608             </if>
       
   609 
       
   610             <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
       
   611                 <then>
       
   612                     <echo message="INFO Updating bctest package with test info"/>
       
   613                     <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
       
   614                         <arg value="ats_specialise_test_drop.pl"/>
       
   615                         <arg value="--test-drop-name=bctest-${build.id}"/> 
       
   616                         <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
       
   617                         <arg value="--src=${sf.spec.test.package.location}\..\bctest\bctest.zip"/>
       
   618                         <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.bccheck.package.name}"/>
       
   619                     </exec>
       
   620                     <!-- Now ready to send to ATS3 -->
       
   621 
       
   622                     <antcall target="sf-send-testpkg" inheritAll="false">
       
   623                         <param name="sf.spec.test.package.name" value="${sf.spec.bccheck.package.name}"/>
       
   624                     </antcall>    
       
   625                 </then>
       
   626             </if>
       
   627         </then>
       
   628         <else>
       
   629             <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
       
   630         </else>
       
   631         </if>
       
   632     </target>
       
   633     
       
   634     <target name="sf-publish" depends="prep-publish">
       
   635         <copy todir="${publish.dir}" preservelastmodified="true" failonerror="false">
       
   636            <fileset dir="${build.log.dir}"><include name="*.zip"/></fileset>
       
   637         </copy>
       
   638     </target>
       
   639 
     3 </project>
   640 </project>