Create short build logs for errors and warnings.
authorlforschler@apple.com <lforschler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 23:03:16 +0000 (23:03 +0000)
committerlforschler@apple.com <lforschler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 23:03:16 +0000 (23:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120614

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
    -include StringIO
(CompileWebKit.createSummary):
    -add a createSummary function which will parse out errors and warnings into a concise log file for quick viewing

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

Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
Tools/ChangeLog

index a6f2af07fe856017780ba24c9ec03a0681e4ceb8..e08285c4567ba3311b5f87164f0361c72fd11794 100644 (file)
@@ -18,6 +18,7 @@ import os
 import re
 import json
 import operator
+import cStringIO
 import urllib
 
 from committer_auth import CommitterAuth
@@ -187,6 +188,22 @@ class CompileWebKit(shell.Compile):
 
         return shell.Compile.start(self)
 
+    def createSummary(self, log):
+        platform = self.getProperty('platform')
+        if platform.startswith('mac'):    
+            warnings = []
+            errors = []
+            sio = cStringIO.StringIO(log.getText())
+            for line in sio.readlines():
+                if "arning:" in line:
+                    warnings.append(line)
+                if "rror:" in line:
+                    errors.append(line)
+            if warnings:
+                self.addCompleteLog('warnings', "".join(warnings))
+            if errors:
+                self.addCompleteLog('errors', "".join(errors))
+
 
 class CompileWebKit1Only(CompileWebKit):
     command = ["perl", "./Tools/Scripts/build-webkit", "--no-webkit2", WithProperties("--%(configuration)s")]
index 07f9a999c682957cd81cbeeeba7d5e139ec800de..b582aa9b3329682dc6b26318f741d75f2a34ea03 100644 (file)
@@ -1,3 +1,15 @@
+2013-09-12  Lucas Forschler  <lforschler@apple.com>
+
+        Create short build logs for errors and warnings.
+        https://bugs.webkit.org/show_bug.cgi?id=120614
+
+        Reviewed by Ryosuke Niwa.
+
+        * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+            -include StringIO 
+        (CompileWebKit.createSummary):
+            -add a createSummary function which will parse out errors and warnings into a concise log file for quick viewing
+
 2013-09-12  Roger Fong  <roger_fong@apple.com>
 
         Update cygwin downloader to search for packages in the right location.