[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
levin at chromium.org
levin at chromium.org
Sun Feb 20 22:50:49 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 58307550d98224e5c60aea96271cd7a1a742ea51
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 12 06:53:51 2011 +0000
2011-01-11 David Levin <levin at chromium.org>
Reviewed by Eric Seidel.
Errors should be separated from the command line in bot messages.
https://bugs.webkit.org/show_bug.cgi?id=52275
* Scripts/webkitpy/common/system/executive.py:
(ScriptError.message_with_output): Added a newline to separate the command
line from the errors.
* Scripts/webkitpy/common/system/executive_unittest.py:
(ScriptErrorTest.test_message_with_output): Added tests for the various code
paths in message_with_output.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index ff09500..d911797 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-11 David Levin <levin at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Errors should be separated from the command line in bot messages.
+ https://bugs.webkit.org/show_bug.cgi?id=52275
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (ScriptError.message_with_output): Added a newline to separate the command
+ line from the errors.
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ScriptErrorTest.test_message_with_output): Added tests for the various code
+ paths in message_with_output.
+
2011-01-11 Eric Seidel <eric at webkit.org>
Unreviewed.
diff --git a/Tools/Scripts/webkitpy/common/system/executive.py b/Tools/Scripts/webkitpy/common/system/executive.py
index bad0fa0..02619db 100644
--- a/Tools/Scripts/webkitpy/common/system/executive.py
+++ b/Tools/Scripts/webkitpy/common/system/executive.py
@@ -83,9 +83,9 @@ class ScriptError(Exception):
def message_with_output(self, output_limit=500):
if self.output:
if output_limit and len(self.output) > output_limit:
- return u"%s\nLast %s characters of output:\n%s" % \
+ return u"%s\n\nLast %s characters of output:\n%s" % \
(self, output_limit, self.output[-output_limit:])
- return u"%s\n%s" % (self, self.output)
+ return u"%s\n\n%s" % (self, self.output)
return unicode(self)
def command_name(self):
diff --git a/Tools/Scripts/webkitpy/common/system/executive_unittest.py b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
index 378eee7..a43b4dc 100644
--- a/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
@@ -44,6 +44,15 @@ class ScriptErrorTest(unittest.TestCase):
self.assertEquals(error._string_from_args([]), '[]')
self.assertEquals(error._string_from_args(map(str, range(30))), "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'...")
+ def test_message_with_output(self):
+ error = ScriptError('My custom message!', '', -1)
+ self.assertEquals(error.message_with_output(), 'My custom message!')
+ error = ScriptError('My custom message!', '', -1, 'My output.')
+ self.assertEquals(error.message_with_output(), 'My custom message!\n\nMy output.')
+ error = ScriptError('', 'my_command!', -1, 'My output.', '/Users/username/blah')
+ self.assertEquals(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
+ error = ScriptError('', 'my_command!', -1, 'ab' + '1' * 499)
+ self.assertEquals(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1\n\nLast 500 characters of output:\nb' + '1' * 499)
def never_ending_command():
"""Arguments for a command that will never end (useful for testing process
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list