Title: [173871] trunk/Tools
Revision
173871
Author
commit-qu...@webkit.org
Date
2014-09-23 07:47:21 -0700 (Tue, 23 Sep 2014)

Log Message

Make Tools/BuildSlaveSupport/wait-for-SVN-server.py handle server donwtime
https://bugs.webkit.org/show_bug.cgi?id=137026

Patch by Tibor Meszaros <tmeszaros.u-sze...@partner.samsung.com> on 2014-09-23
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/wait-for-SVN-server.py:
(getLatestSVNRevision):
(waitForSVNRevision):

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py (173870 => 173871)


--- trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py	2014-09-23 09:57:53 UTC (rev 173870)
+++ trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py	2014-09-23 14:47:21 UTC (rev 173871)
@@ -28,9 +28,14 @@
 
 
 def getLatestSVNRevision(SVNServer):
+    p = subprocess.Popen(["svn", "log", "--non-interactive", "--verbose", "--xml", "--limit=1", SVNServer], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+    response = p.communicate()[0]
+    if p.returncode != 0:
+        print "Can't connect to host: %s, return code %s " % (SVNServer, p.returncode)
+        print "OUTPUT:"
+        print response
+        return -1
     try:
-        p = subprocess.Popen(["svn", "log", "--non-interactive", "--verbose", "--xml", "--limit=1", SVNServer], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-        response = p.communicate()[0]
         doc = xml.dom.minidom.parseString(response)
         el = doc.getElementsByTagName("logentry")[0]
         return el.getAttribute("revision")
@@ -52,7 +57,10 @@
     revision = int(revision)
     while True:
         latestRevision = int(getLatestSVNRevision(SVNServer))
-        if latestRevision < revision:
+        if latestRevision == -1:
+            print "%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer)
+            time.sleep(60)
+        elif latestRevision < revision:
             print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)
             time.sleep(5)
         else:

Modified: trunk/Tools/ChangeLog (173870 => 173871)


--- trunk/Tools/ChangeLog	2014-09-23 09:57:53 UTC (rev 173870)
+++ trunk/Tools/ChangeLog	2014-09-23 14:47:21 UTC (rev 173871)
@@ -1,5 +1,16 @@
 2014-09-23  Tibor Meszaros  <tmeszaros.u-sze...@partner.samsung.com>
 
+        Make Tools/BuildSlaveSupport/wait-for-SVN-server.py handle server donwtime
+        https://bugs.webkit.org/show_bug.cgi?id=137026
+
+        Reviewed by Csaba Osztrogonác.
+
+        * BuildSlaveSupport/wait-for-SVN-server.py:
+        (getLatestSVNRevision):
+        (waitForSVNRevision):
+
+2014-09-23  Tibor Meszaros  <tmeszaros.u-sze...@partner.samsung.com>
+
         Remove unlinkZeroFiles from build-webkit
         https://bugs.webkit.org/show_bug.cgi?id=137018
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to