harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r568418 - /harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
Date Wed, 22 Aug 2007 05:02:31 GMT
Author: varlax
Date: Tue Aug 21 22:02:30 2007
New Revision: 568418

URL: http://svn.apache.org/viewvc?rev=568418&view=rev
Log:
Keep copies of cc log and mail message in results directory, for providing complete set of
artifacts.

Modified:
    harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml?rev=568418&r1=568417&r2=568418&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml Tue Aug 21 22:02:30
2007
@@ -133,8 +133,12 @@
             depends="define-ant-contrib"
             if="framework.parameters.usemail"
             unless="${suite.name}.parameters.run.skipped">
+        
+        <available file="${cc.execution.log.file}" property="cc.execution.log.file.available"/>
+        <runtarget target="-store-cc-logs"/>
         <!-- attach execution log file in case of failure -->
-        <if>
+        <condition property="mail.execution.log" 
+            value="${temp.files.dir}/execution_log.zip">
             <and>
                 <isfalse value="${thisbuildsuccessful}"/>
                 <not><isset 
@@ -145,32 +149,20 @@
                 </not>
                 <available file="${cc.execution.log.file}"/>
             </and>
-        <then>
-            <delete file="${temp.files.dir}/execution_log.zip" 
-                    failonerror="false"/>
-            <zip destfile="${temp.files.dir}/execution_log.zip">
-                <fileset file="${cc.execution.log.file}"/>
-            </zip>
-            <property name="mail.execution.log" 
-                 value="${temp.files.dir}/execution_log.zip"/>
-        </then>
-        </if>
+        </condition>
 
         <!-- compose message from CC logs (it there is no message file
              provided by test suite) -->
-        <if>
+        <condition property="mail.message" value="${cc.message.file}">
             <not>
             <or>
                 <isset property="${suite.name}.parameters.cc.message"/>
                 <isset property="${suite.name}.parameters.mail.message"/>
             </or>
             </not>
-        <then>
-            <runtarget target="-compose-message-file"/>
-        </then>
-        </if>
+        </condition>
 
-        <!-- do mail notifiaction -->
+        <!-- do mail notification -->
         <ant dir="${scripts.dir}" 
              antfile="${scripts.dir}/publisher.xml" 
              target="publish"
@@ -204,17 +196,32 @@
         
     </target>
 
+    <target name="-store-cc-logs" if="cc.execution.log.file.available">
+        <property name="suite.results.dir" location="${results.dir}/${suite.name}"/>
+        <mkdir dir="${suite.results.dir}"/>
+        <delete file="${temp.files.dir}/execution_log.zip" 
+                    failonerror="false"/>
+        <copy file="${cc.execution.log.file}" todir="${suite.results.dir}"/>
+        <zip destfile="${temp.files.dir}/execution_log.zip">
+            <fileset file="${cc.execution.log.file}"/>
+        </zip>
+
+        <!-- compose summary from CC logs -->
+        <runtarget target="-compose-message-file"/>
+        <copy file="${cc.message.file}" todir="${suite.results.dir}" failonerror="false"/>
+    </target>
+
     <!-- compose message from CC logs -->
     <target name="-compose-message-file"
             unless="mail.message">
         <property name="cc.xsl.files.dir"
                   value="${ext.cc.location}/webapps/cruisecontrol/xsl"/>
-        <property name="mail.message"
+        <property name="cc.message.file"
                   value="${temp.files.dir}/${suite.name}-email-message.txt"/>
         <xslt basedir="${scripts.dir}/xslt"
               in="${logdir}/${logfile}"
               style="${scripts.dir}/xslt/br.xsl"
-              out="${mail.message}"
+              out="${cc.message.file}"
               classpath="${ext.xalan.location}:${ext.cc.location}/lib/serializer-2.7.0.jar"/>
     </target>
 



Mime
View raw message