harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r652236 - /harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml
Date Wed, 30 Apr 2008 03:10:17 GMT
Author: smishura
Date: Tue Apr 29 20:10:17 2008
New Revision: 652236

URL: http://svn.apache.org/viewvc?rev=652236&view=rev
Log:
Replace 'update-svn' by 'export-svn-revision' target:
new target export snapshot svn revision to adaptors

Modified:
    harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml

Modified: harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml?rev=652236&r1=652235&r2=652236&view=diff
==============================================================================
--- harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml (original)
+++ harmony/enhanced/buildtest/trunk/infra/scripts/cc-exec-adaptor.xml Tue Apr 29 20:10:17
2008
@@ -43,11 +43,8 @@
         <record name="${cc.execution.log.file}" append="yes" action="start"/>
         <trycatch property="exception" reference="execution.exception.ref">
         <try>
-            <!-- FIXME: is this really required?
-                 CruiseControl should update ws
-
-            <runtarget target="update-svn"/>
-            -->
+            <check-depends suite="${suite.name}" />
+            <runtarget target="-export-svn-revision"/>
             
             <ant dir="${root.dir}/adaptors/${suite.name}" 
                  antfile="adaptor.xml" 
@@ -70,16 +67,29 @@
               message="&lt;/body>&lt;/html>"/>
         <fail message="${exception}" if="exception"/>
     </target>
-    
-    <target name="update-svn" if="${suite.name}.parameters.cc.usesvn" 
-        unless="${suite.name}.parameters.cc.skip.svnupdate">
-        <!-- "svnrevision" property is set by CC since v2.7.1 -->
-        <property name="svnrevision" value="HEAD"/>
-        <propertycopy property="ws" from="${suite.name}.parameters.cc.usesvn"/>
-        <svn-cleanup trunk="${ws}"/>
-        <exec executable="svn" dir="${ws}" failonerror="true">
-            <arg line="update -r ${svnrevision}"/>
-        </exec>
+
+    <macrodef name="check-depends">
+        <attribute name="suite"/>
+        <sequential>
+            <condition property="is.snapshot">
+                <contains string="${@{suite}.parameters.depends}"
+                    substring="snapshot"/>
+            </condition>
+        </sequential>
+    </macrodef>
+
+    <target name="-export-svn-revision" if="is.snapshot" >
+
+        <!-- TODO: the target should update workspaces by svn.xml -->
+        <loadproperties srcFile="${config.dir}/snapshot.properties">
+            <filterchain>
+                <linecontainsregexp>
+                    <regexp pattern="snapshot.svn.revision.file=" />
+                </linecontainsregexp>
+            </filterchain>
+        </loadproperties>
+        
+        <loadproperties srcFile="${snapshot.svn.revision.file}" />
     </target>
 
     <!-- Called from CC to launch the custom ant publisher for test suite -->



Mime
View raw message