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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2633753003: [Android] Stop using universal_newlines in the layout tests server constructor. (RELAND) (Closed)
Patch Set: accept unicode and str objects Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 if self._filesystem.exists(sanitizer_filter_path): 1458 if self._filesystem.exists(sanitizer_filter_path):
1459 stderr = self._executive.run_command( 1459 stderr = self._executive.run_command(
1460 ['flock', sys.executable, sanitizer_filter_path, sanitizer_s trip_path_prefix], 1460 ['flock', sys.executable, sanitizer_filter_path, sanitizer_s trip_path_prefix],
1461 input=stderr, decode_output=False, env=env) 1461 input=stderr, decode_output=False, env=env)
1462 1462
1463 name_str = name or '<unknown process name>' 1463 name_str = name or '<unknown process name>'
1464 pid_str = str(pid or '<unknown>') 1464 pid_str = str(pid or '<unknown>')
1465 1465
1466 # We require stdout and stderr to be bytestrings, not character strings. 1466 # We require stdout and stderr to be bytestrings, not character strings.
1467 if stdout: 1467 if stdout:
1468 assert isinstance(stdout, str) 1468 assert isinstance(stdout, basestring)
1469 stdout_lines = stdout.decode('utf8', 'replace').splitlines() 1469 stdout_lines = stdout.decode('utf8', 'replace').splitlines()
1470 else: 1470 else:
1471 stdout_lines = [u'<empty>'] 1471 stdout_lines = [u'<empty>']
1472 if stderr: 1472 if stderr:
1473 assert isinstance(stderr, str) 1473 assert isinstance(stderr, basestring)
1474 stderr_lines = stderr.decode('utf8', 'replace').splitlines() 1474 stderr_lines = stderr.decode('utf8', 'replace').splitlines()
1475 else: 1475 else:
1476 stderr_lines = [u'<empty>'] 1476 stderr_lines = [u'<empty>']
1477 1477
1478 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_ str, 1478 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_ str,
1479 '\n'.join(('ST DOUT: ' + l) for l in stdout_lines), 1479 '\n'.join(('ST DOUT: ' + l) for l in stdout_lines),
1480 '\n'.join(('ST DERR: ' + l) for l in stderr_lines))) 1480 '\n'.join(('ST DERR: ' + l) for l in stderr_lines)))
1481 1481
1482 def look_for_new_crash_logs(self, crashed_processes, start_time): 1482 def look_for_new_crash_logs(self, crashed_processes, start_time):
1483 pass 1483 pass
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 1651
1652 def __init__(self, base, args, reference_args=None): 1652 def __init__(self, base, args, reference_args=None):
1653 self.name = base 1653 self.name = base
1654 self.base = base 1654 self.base = base
1655 self.args = args 1655 self.args = args
1656 self.reference_args = args if reference_args is None else reference_args 1656 self.reference_args = args if reference_args is None else reference_args
1657 self.tests = set() 1657 self.tests = set()
1658 1658
1659 def __repr__(self): 1659 def __repr__(self):
1660 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1660 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698