Skip to content

Commit

Permalink
Try #3 to fix the android layout tests crash in run-webkit-tests.
Browse files Browse the repository at this point in the history
This patch forcibly reencodes to ASCII at a different layer, matching
where we're actually seeing the stack trace. This seems like an
overly broad solution, but may at least get us past the crash so I can
see where things might really be failing.

This change also backs out the change in r182282, since it didn't seem
to help anything.

[email protected]
BUG=386343

Review URL: https://codereview.chromium.org/591563002

git-svn-id: svn://svn.chromium.org/blink/trunk@182358 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
dpranke committed Sep 19, 2014
1 parent 4d3d729 commit 920aa70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Tools/Scripts/webkitpy/layout_tests/port/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ def run(self, command, ignore_error=False):
result = self._executive.run_command(self.adb_command() + command, error_handler=error_handler, debug_logging=self._debug_logging)

# We limit the length to avoid outputting too verbose commands, such as "adb logcat".
# Also make sure that the output is ascii-encoded to avoid confusing other parts of
# the system.
self._log_debug('Run adb result: ' + result[:80].encode('ascii', errors='replace'))
self._log_debug('Run adb result: ' + result[:80])
return result

def get_serial(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def write(self, txt, now=None, pid=None):
else:
msg = self._ensure_newline(txt)

self._stream.write(msg)
self._stream.write(msg.decode('ascii', errors='replace'))

def writeln(self, txt, now=None, pid=None):
self.write(self._ensure_newline(txt), now, pid)
Expand Down

0 comments on commit 920aa70

Please sign in to comment.