Title: [238535] trunk/Tools
Revision
238535
Author
aakash_j...@apple.com
Date
2018-11-26 17:05:53 -0800 (Mon, 26 Nov 2018)

Log Message

[ews-app] Add support to communicate with Buildbot
https://bugs.webkit.org/show_bug.cgi?id=191935

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/common/__init__.py: Added.
* BuildSlaveSupport/ews-app/ews/common/buildbot.py: Added.

Modified Paths

Added Paths

Diff

Added: trunk/Tools/BuildSlaveSupport/ews-app/ews/common/__init__.py ( => )


Added: trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py
===================================================================
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py	2018-11-27 01:05:53 UTC (rev 238535)
@@ -0,0 +1,51 @@
+# Copyright (C) 2018 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import logging
+import os
+import subprocess
+
+import ews.config as config
+
+_log = logging.getLogger(__name__)
+
+
+class Buildbot():
+    @classmethod
+    def send_patch_to_buildbot(cls, patch_path, properties=[]):
+        command = ['buildbot', 'try',
+                   '--connect=pb',
+                   '--master={}:{}'.format(config.BUG_SERVER_HOST, config.BUILDBOT_SERVER_PORT),
+                   '--username={}'.format(config.BUILDBOT_PB_USERNAME),
+                   '--passwd={}'.format(config.BUILDBOT_PB_PASSWORD),
+                   '--diff={}'.format(patch_path),
+                   '--repository=']
+
+        for property in properties:
+            command.append('--property={}'.format(property))
+
+        _log.debug('Executing command: {}'.format(command))
+        return_code = subprocess.call(command)
+        if return_code:
+            _log.warn('Error executing: {}, return code={}'.format(command, return_code))
+
+        return return_code

Modified: trunk/Tools/ChangeLog (238534 => 238535)


--- trunk/Tools/ChangeLog	2018-11-27 01:02:42 UTC (rev 238534)
+++ trunk/Tools/ChangeLog	2018-11-27 01:05:53 UTC (rev 238535)
@@ -1,3 +1,13 @@
+2018-11-26  Aakash Jain  <aakash_j...@apple.com>
+
+        [ews-app] Add support to communicate with Buildbot
+        https://bugs.webkit.org/show_bug.cgi?id=191935
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/common/__init__.py: Added.
+        * BuildSlaveSupport/ews-app/ews/common/buildbot.py: Added.
+
 2018-11-26  Jonathan Bedard  <jbed...@apple.com>
 
         webkitpy: Race condition in ServerProcess tests
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to