Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1862)

Unified Diff: Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 1169433005: Try Yet Again to handle the output we get from android in run-webkit-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: patch for review Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/android.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/layout_tests/port/base.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index bb42fbc8aec149e07f712166ab3a6f7becea0213..493cecf216bc675adc89a47bfc20766652170047 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -1535,8 +1535,19 @@ class Port(object):
name_str = name or '<unknown process name>'
pid_str = str(pid or '<unknown>')
- stdout_lines = (stdout or '<empty>').decode('utf8', 'replace').splitlines()
- stderr_lines = (stderr or '<empty>').decode('utf8', 'replace').splitlines()
+
+ # We require stdout and stderr to be bytestrings, not character strings.
+ if stdout:
+ assert isinstance(stdout, str)
+ stdout_lines = stdout.decode('utf8', 'replace').splitlines()
+ else:
+ stdout_lines = [u'<empty>']
+ if stderr:
+ assert isinstance(stderr, str)
+ stderr_lines = stderr.decode('utf8', 'replace').splitlines()
+ else:
+ stderr_lines = [u'<empty>']
+
return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_str,
'\n'.join(('STDOUT: ' + l) for l in stdout_lines),
'\n'.join(('STDERR: ' + l) for l in stderr_lines)))
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/android.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698