harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r588170 - in /harmony/enhanced/buildtest/branches/2.0/scripts: main.xml publisher.xml
Date Thu, 25 Oct 2007 09:01:20 GMT
Author: smishura
Date: Thu Oct 25 02:01:19 2007
New Revision: 588170

URL: http://svn.apache.org/viewvc?rev=588170&view=rev
Log:
Refactor main publisher - move initialization to the separate target

Modified:
    harmony/enhanced/buildtest/branches/2.0/scripts/main.xml
    harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/main.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/main.xml?rev=588170&r1=588169&r2=588170&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/main.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/main.xml Thu Oct 25 02:01:19 2007
@@ -151,7 +151,6 @@
                       value="true"/>
 
             <property name="mail.execution.status" value="TEST MAIL"/>
-            <property name="framework.parameters.usedo.mail" value="true"/>
             <property name="thisbuildsuccessful" value="false"/>
         </ant>
     </target>

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml?rev=588170&r1=588169&r2=588170&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml Thu Oct 25 02:01:19 2007
@@ -19,45 +19,46 @@
                         Status Publisher Implementation
      ====================================================================== -->
 <project name="publisher" default="publish" basedir=".">
-    
-    <!-- check whether we should send notification or not -->
-    <condition property="do.mail">
-        <and>
-            <!-- if framework was configured to send notifications -->
-            <isset property="mail"/>
+
+    <import file="properties.xml"/>
+
+    <target name="-configure" if="mail">
+
+        <!-- if was configured always notify about run status -->
+        <!-- or, in case of run-status change                 -->
+        <condition property="to" value="${mail.to}">
             <or>
-                <!-- and it was configured to always notify about run status -->
-                <istrue value="${mail.always}"/>
-                <!-- or, in case of run-status change -->
+                <istrue value="${mail.always}" />
                 <not>
                     <equals arg1="${thisbuildsuccessful}"
-                            arg2="${lastbuildsuccessful}"/>
+                            arg2="${lastbuildsuccessful}" />
                 </not>
             </or>
-        </and>
-    </condition>
-
-    <condition property="mail.execution.status"
-               value="PASSED"
-               else="FAILED">
-        <istrue value="${thisbuildsuccessful}"/>
-    </condition>
-
-    <!-- architecture name -->
-    <import file="properties.xml"/>
+        </condition>
+        <condition property="bcc" value="${mail.bcc}">
+            <isset property="to" />
+        </condition>
+    </target>
+    
+    <!-- implement publisher interface -->
+    <target name="publish" if="to" depends="-configure">
 
-    <!-- compose subject line -->
-    <property name="mail.subject.suffix" value=""/>
-    <property name="mail.subject.line"
-              value="${mail.subject.prefix} ${mail.execution.status} ${os.name} ${hy.arch}:
${suite.name} ${mail.subject.suffix}"/>
+        <condition property="mail.execution.status"
+                   value="PASSED"
+                   else="FAILED">
+            <istrue value="${thisbuildsuccessful}" />
+        </condition>
+
+        <!-- compose subject line -->
+        <property name="mail.subject.suffix" value="" />
+        <property name="mail.subject.line"
+                  value="${mail.subject.prefix} ${mail.execution.status} ${os.name} ${hy.arch}:
${suite.name} ${mail.subject.suffix}" />
 
-    <!-- implement publisher interface -->
-    <target name="publish" if="do.mail">
         <log message=""/>
         <log message="    Sending mail notification:"/>
         <log message="        smtp: '${mail}'"/>
-        <log message="        to: '${mail.to}'"/>
-        <log message="        bcc: '${mail.bcc}'"/>
+        <log message="        to: '${to}'"/>
+        <log message="        bcc: '${bcc}'"/>
         <log message="        from: '${mail.from}'"/>
         <log message="    Files to attach: ${mail.attachs}"/>
         <log message="    Execution logs file: ${mail.execution.log}"/>
@@ -85,9 +86,9 @@
             <!-- no attachments by default -->
             <property name="mail.attachs" value=""/>
             <mail mailhost="${mail}"
-                  tolist="${mail.to}"
+                  tolist="${to}"
                   from="${mail.from}"
-                  bcclist="${mail.bcc}"
+                  bcclist="${bcc}"
                   subject="${mail.subject.line}"
                   files="${mail.attachs},${mail.execution.log}">
                 <message>${mail.summary.content}${line.separator}${mail.message.content}</message>
@@ -115,8 +116,8 @@
         <text name="text"/>
         <sequential>
             <mail mailhost="${mail}"
-                  tolist="${mail.to}"
-                  bcclist="${mail.bcc}"
+                  tolist="${to}"
+                  bcclist="${bcc}"
                   from="${mail.from}"
                   subject="${mail.subject.line}">
                 <message>



Mime
View raw message