[ews-build] Add build step to print bot Configuration
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 21:56:41 +0000 (21:56 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 21:56:41 +0000 (21:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193887

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(PrintConfiguration): Build step to print configuration.
* BuildSlaveSupport/ews-build/factories.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/factories.py
Tools/BuildSlaveSupport/ews-build/steps.py
Tools/ChangeLog

index ea995ac..2bfa62e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -36,6 +36,7 @@ class Factory(factory.BuildFactory):
         if checkRelevance:
             self.addStep(CheckPatchRelevance())
         self.addStep(ValidatePatch())
+        self.addStep(PrintConfiguration())
         self.addStep(CheckOutSource())
         self.addStep(ApplyPatch())
 
index 413018b..b39bb56 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -20,6 +20,7 @@
 # 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.
 
+from buildbot.plugins import steps, util
 from buildbot.process import buildstep, logobserver, properties
 from buildbot.process.results import Results, SUCCESS, FAILURE, WARNINGS, SKIPPED, EXCEPTION, RETRY
 from buildbot.steps import master, shell, transfer
@@ -741,3 +742,24 @@ class ExtractTestResults(master.MasterShellCommand):
     def finished(self, result):
         self.addCustomURLs()
         return master.MasterShellCommand.finished(self, result)
+
+
+class PrintConfiguration(steps.ShellSequence):
+    name = 'configuration'
+    description = ['configuration']
+    descriptionDone = ['configuration']
+    haltOnFailure = False
+    flunkOnFailure = False
+    warnOnFailure = False
+    command_list = [['hostname'],
+                    ['df', '-hl'],
+                    ['date'],
+                    ['sw_vers'],
+                    ['xcodebuild', '-sdk', '-version']]
+
+    def __init__(self, **kwargs):
+        super(PrintConfiguration, self).__init__(timeout=60, **kwargs)
+        self.commands = []
+        # FIXME: Check platform before running platform specific commands.
+        for command in self.command_list:
+            self.commands.append(util.ShellArg(command=command, logfile=command[0]))
index 84bed67..5b549ba 100644 (file)
@@ -1,3 +1,14 @@
+2019-01-29  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Add build step to print bot Configuration
+        https://bugs.webkit.org/show_bug.cgi?id=193887
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (PrintConfiguration): Build step to print configuration.
+        * BuildSlaveSupport/ews-build/factories.py:
+
 2019-01-29  Chris Dumez  <cdumez@apple.com>
 
         Regression (r240046): [PSON] Spurious changes to [WKWebView url] and [WKWebView loading] after [WKWebView loadRequest]