common/build.xml
changeset 198 4b1e939c052c
parent 197 e7c76e615b76
child 206 62976b2583f7
--- a/common/build.xml	Mon Jun 15 15:39:34 2009 +0100
+++ b/common/build.xml	Thu Jun 18 09:11:23 2009 +0100
@@ -28,6 +28,9 @@
     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
     
+    <!-- SF-specific Helium properties not meant to be exposed in the project spec -->
+    <property name="diamonds.listener.configuration.file" location="${sf.common.config.dir}/diamonds/config.xml.ftl"/>
+    
     <!-- import all core HELIUM targets -->
     <import file="${helium.dir}/helium.ant.xml" />
     
@@ -419,7 +422,7 @@
     
     <target name="sf-diamondize-bom">
         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
-              outputFile="${build.drive}/output/logs/BOM/build-info.xml">
+              outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
             <data expandProperties="yes">
                 ant: antProperties()
                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
@@ -620,14 +623,36 @@
       </path>
       <sequential>
         <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
+        <propertyregex override="yes" property="yarpfile_short"  input="${yarpfile}" regexp="[^_]*_[^_]*_[^_]*_(.+)_[^_]*_yarp\.csv" replace="YARP_\1"/>
         <echo message="Yarping @{logfile}..."/>
         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_yarp.log" append="true">
           <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
           <arg value="@{logfile}"/>
           <arg value="${build.log.dir}/analysis/${yarpfile}"/>
         </exec>
+        <exec executable="cmd" output="${build.drive}/output/logs/analysis/tmp_yarp_files.csv" append="true">
+          <arg value="/c"/>
+          <arg value="echo"/>
+          <arg value="${yarpfile_short},${sf.spec.publish.networkdrive}\${sf.spec.job.name}\builds\${sf.spec.job.codeline}\${build.id}\logs\analysis\${yarpfile}"/>
+        </exec>
       </sequential>
     </for>
+    
+    <!-- fake build results file -->
+    <!-- copy file="D:\zoo\fake_results_file\sf-run-analysis.xml" todir="${build.drive}/output/logs" failonerror="false" verbose="true"/ -->
+    
+    <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
+      <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
+      <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
+    </exec>
+    <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
+    
+    <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()
+        files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path]})
+      </data>
+    </fmpp>
 
     </target>