common/build.xml
changeset 310 8337c2afc41f
parent 309 8b5fb484a920
child 313 52d855dfda13
equal deleted inserted replaced
309:8b5fb484a920 310:8337c2afc41f
   766     </target>   
   766     </target>   
   767 
   767 
   768     <!-- runs analysis of missing bins and source -->
   768     <!-- runs analysis of missing bins and source -->
   769     <target name="sf-run-analysis">
   769     <target name="sf-run-analysis">
   770         <mkdir dir="${build.log.dir}/analysis"/>
   770         <mkdir dir="${build.log.dir}/analysis"/>
   771 
   771         <parallel>
       
   772           <runtarget target="sf-run-analysis-ant"/>
       
   773           <runtarget target="sf-run-analysis-raptor"/>
       
   774           <runtarget target="sf-run-analysis-yarp"/>
       
   775           <runtarget target="sf-run-analysis-whatlog-summary"/>
       
   776         </parallel>
       
   777         <runtarget target="sf-run-analysis-diamonds"/>
       
   778     </target>
       
   779 
       
   780     <target name="sf-run-analysis-ant">    
   772         <echo message="Running source analysis of ANT output"/>
   781         <echo message="Running source analysis of ANT output"/>
   773         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
   782         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
   774             <arg value="${sf.common.config.dir}/tools/analysis/scan_antlogs.pl"/>
   783             <arg value="${sf.common.config.dir}/tools/analysis/scan_antlogs.pl"/>
   775             <arg value="*ant*"/>
   784             <arg value="*ant*"/>
   776         </exec>
   785         </exec>
   777 
   786     </target>
       
   787 
       
   788     <target name="sf-run-analysis-list">    
   778         <echo message="Running list analysis"/>
   789         <echo message="Running list analysis"/>
   779         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
   790         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_list_results.log">
   780             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
   791             <arg value="${sf.common.config.dir}/tools/analysis/parselistdirs.pl"/>
   781             <arg value="..\"/>
   792             <arg value="..\"/>
   782         </exec>
   793         </exec>
   783 
   794     </target>
       
   795 
       
   796     <target name="sf-run-analysis-whatlog">    
   784         <echo message="Running whatlog analysis"/>
   797         <echo message="Running whatlog analysis"/>
   785         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
   798         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_what_results.csv">
   786             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
   799             <arg value="${sf.common.config.dir}/tools/analysis/parsewhatlog.pl"/>
   787             <arg value="..\"/>
   800             <arg value="..\"/>
   788         </exec>
   801         </exec>
   789 
   802     </target>
       
   803 
       
   804     <target name="sf-run-analysis-whatlog-summary" >
       
   805         <sequential>
       
   806           <parallel>
       
   807             <runtarget target="sf-run-analysis-list"/>
       
   808             <runtarget target="sf-run-analysis-whatlog"/>
       
   809           </parallel>
       
   810           <runtarget target="sf-run-analysis-whatlog-merge" />
       
   811           <parallel>
       
   812             <runtarget target="sf-run-analysis-whatlog-package"/>
       
   813             <runtarget target="sf-run-analysis-whatlog-collisons"/>
       
   814           </parallel>
       
   815         </sequential>
       
   816     </target>
       
   817     
       
   818     <target name="sf-run-analysis-whatlog-merge" >        
   790         <echo message="Running summary analysis"/>
   819         <echo message="Running summary analysis"/>
   791         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
   820         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_summary.log">
   792             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
   821             <arg value="${sf.common.config.dir}/tools/analysis/merge_csv.pl"/>
   793             <arg value="${build.id}_what_results.csv"/>
   822             <arg value="${build.id}_what_results.csv"/>
   794             <arg value="${build.id}_list_results.log"/>
   823             <arg value="${build.id}_list_results.log"/>
   795             <arg value="${build.drive}/output/zips/release/binaries_epoc_additional.zip"/>
   824             <arg value="${build.drive}/output/zips/release/binaries_epoc_additional.zip"/>
   796         </exec>
   825         </exec>
   797 
   826     </target>
       
   827     
       
   828     <target name="sf-run-analysis-whatlog-package" >        
   798         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   829         <exec executable="perl" dir="${build.log.dir}/analysis" failonerror="false" output="${build.log.dir}/analysis/${build.id}_analysecomponents.log">
   799             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   830             <arg value="${sf.common.config.dir}/tools/analysis/analyse_components.pl"/>
   800             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   831             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   801             <arg value="${build.id}_what_results.csv_results.csv"/>
   832             <arg value="${build.id}_what_results.csv_results.csv"/>
   802             <arg value="${sf.project.location}/sysdefs/system_model_os.xml"/>
   833             <arg value="${sf.project.location}/sysdefs/system_model_os.xml"/>
   803         </exec>
   834         </exec>
   804 
   835     </target>
       
   836     
       
   837     <target name="sf-run-analysis-whatlog-collisons" >        
   805         <echo message="Running collision analysis"/>
   838         <echo message="Running collision analysis"/>
   806         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
   839         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_collisions.log">
   807             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
   840             <arg value="${sf.common.config.dir}/tools/analysis/find_collisions.pl"/>
   808             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
   841             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
   809         </exec>
   842         </exec>
   810         
   843     </target>
   811         
   844 
       
   845     <target name="sf-run-analysis-raptor">            
   812       <echo message="Preprocessing *_compile.log files"/>
   846       <echo message="Preprocessing *_compile.log files"/>
   813       <for param="logfile">
   847       <for param="logfile">
   814         <path>
   848         <path>
   815           <fileset dir="${build.log.dir}">
   849           <fileset dir="${build.log.dir}">
   816             <include name="*_compile.log"/>
   850             <include name="*_compile.log"/>
   861             <arg value="--basedir=${build.log.dir}/raptorbits"/>
   895             <arg value="--basedir=${build.log.dir}/raptorbits"/>
   862             <arg value="--append"/>
   896             <arg value="--append"/>
   863           </exec>
   897           </exec>
   864         </sequential>
   898         </sequential>
   865       </for>
   899       </for>
   866       
   900             <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
       
   901       <for param="tsv">
       
   902         <path>
       
   903           <fileset dir="${build.log.dir}/releaseables">
       
   904             <include name="**/*.tsv"/>
       
   905           </fileset>
       
   906         </path>
       
   907         <sequential>
       
   908           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   909             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   910           </exec>
       
   911         </sequential>
       
   912       </for>
       
   913     </target>
       
   914 
       
   915     <target name="sf-run-analysis-yarp">          
   867       <echo message="Running yarp over *_compile.log files"/>
   916       <echo message="Running yarp over *_compile.log files"/>
   868       <for param="logfile">
   917       <for param="logfile">
   869         <path>
   918         <path>
   870           <fileset dir="${build.log.dir}">
   919           <fileset dir="${build.log.dir}">
   871             <include name="*_compile.log"/>
   920             <include name="*_compile.log"/>
   892       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
   941       <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
   893         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
   942         <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
   894         <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
   943         <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
   895       </exec>
   944       </exec>
   896       <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
   945       <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
   897       
   946     </target>
       
   947     
       
   948     <target name="sf-run-analysis-diamonds">      
   898       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
   949       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
   899         <data expandProperties="yes">
   950         <data expandProperties="yes">
   900           ant: antProperties()
   951           ant: antProperties()
   901           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
   952           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
   902           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   953           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   903         </data>
   954         </data>
   904       </fmpp>
   955       </fmpp>
   905 
   956     </target>
   906 
   957     
   907       <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
   958 
   908       <for param="tsv">
       
   909         <path>
       
   910           <fileset dir="${build.log.dir}/releaseables">
       
   911             <include name="**/*.tsv"/>
       
   912           </fileset>
       
   913         </path>
       
   914         <sequential>
       
   915           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   916             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   917           </exec>
       
   918         </sequential>
       
   919       </for>
       
   920     </target>
       
   921 
   959 
   922     <target name="sf-package-validate">
   960     <target name="sf-package-validate">
   923         <exec executable="7z" dir="${build.drive}/output/zips" failonerror="false" output="${build.drive}/output/zips/validate.log">
   961         <exec executable="7z" dir="${build.drive}/output/zips" failonerror="false" output="${build.drive}/output/zips/validate.log">
   924             <arg value="t"/>
   962             <arg value="t"/>
   925             <arg value="*.zip"/>
   963             <arg value="*.zip"/>