Raptor error analysis to be published to Diamonds
authorDario Sestito <darios@symbian.org>
Wed, 15 Jul 2009 11:40:44 +0100
changeset 237 f7fc039dd3a3
parent 236 f3105028766d
child 238 02e483ad6786
Raptor error analysis to be published to Diamonds
common/build.xml
common/diamonds/sf-run-analysis.xml.ftl
--- a/common/build.xml	Mon Jul 13 18:38:01 2009 +0100
+++ b/common/build.xml	Wed Jul 15 11:40:44 2009 +0100
@@ -772,12 +772,13 @@
           <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">
             <arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
           </exec>
+        </sequential>
       </for>
       
       <echo message="Extracting whatlog information from *whatlog*_compile_preprocessed.log files"/>
       <for param="whatlogfile">
         <path>
-          <fileset dir="${build.log.dir}">
+          <fileset dir="${build.log.dir}/analysis">
             <include name="*whatlog*_compile_preprocessed.log"/>
           </fileset>
         </path>
@@ -786,7 +787,7 @@
           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" append="true">
             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
             <arg value="--releaseable"/>
-            <arg value="--log=${build.log.dir}/analysis/${whatlogfile}"/>
+            <arg value="--log=@{whatlogfile}"/>
             <arg value="--basedir=${build.log.dir}"/>
             <arg value="--append"/>
           </exec>
@@ -796,7 +797,7 @@
       <echo message="Extracting error information from *_compile_preprocessed.log files"/>
       <for param="raptorlogfile">
         <path>
-          <fileset dir="${build.log.dir}">
+          <fileset dir="${build.log.dir}/analysis">
             <include name="*_compile_preprocessed.log"/>
           </fileset>
         </path>
@@ -805,7 +806,7 @@
           <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
             <arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
             <arg value="--error"/>
-            <arg value="--log=${build.log.dir}/analysis/${raptorlogfile}"/>
+            <arg value="--log=@{raptorlogfile}"/>
             <arg value="--basedir=${build.log.dir}/raptorbits"/>
             <arg value="--append"/>
           </exec>
@@ -846,6 +847,7 @@
       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
         <data expandProperties="yes">
           ant: antProperties()
+          raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
         </data>
       </fmpp>
--- a/common/diamonds/sf-run-analysis.xml.ftl	Mon Jul 13 18:38:01 2009 +0100
+++ b/common/diamonds/sf-run-analysis.xml.ftl	Wed Jul 15 11:40:44 2009 +0100
@@ -1,11 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
+
 <diamonds-build>
   <schema>10</schema>
+  
+<#assign raptor_count=0/>
+<#list raptor_summary as raptor_item>
+<#assign raptor_count=raptor_count+1 />
+</#list>
 
   <faults>
     <total severity="error">${ant['sf.job.totalyarperrors']}</total>
     <total severity="warning">0</total>
-    <total severity="warning_rvct_bad">0</total>
+    <total severity="warning_rvct_bad">${raptor_count}</total>
     <total severity="warning_rvct_other">0</total>
     <total severity="codescanner_high">0</total>
     <total severity="codescanner_medium">0</total>
@@ -20,6 +26,11 @@
       <url>file:///${f.path}</url>
     </file>
     </#list>
+    <file>
+      <type>log</type>
+      <name>Raptor summary</name>
+      <url>file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\logs\raptorbits\summary.csv</url>
+    </file>
   </files>
   
 </diamonds-build>
\ No newline at end of file