| OLD | NEW |
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 stdout.encode('utf8', 'replace'), | 1059 stdout.encode('utf8', 'replace'), |
| 1060 stderr.encode('utf8', 'replace'), | 1060 stderr.encode('utf8', 'replace'), |
| 1061 newer_than) | 1061 newer_than) |
| 1062 | 1062 |
| 1063 def cmd_line(self, pixel_tests, per_test_args): | 1063 def cmd_line(self, pixel_tests, per_test_args): |
| 1064 # The returned command line is used to start _server_process. In our cas
e, it's an interactive 'adb shell'. | 1064 # The returned command line is used to start _server_process. In our cas
e, it's an interactive 'adb shell'. |
| 1065 # The command line passed to the driver process is returned by _driver_c
md_line() instead. | 1065 # The command line passed to the driver process is returned by _driver_c
md_line() instead. |
| 1066 return self._android_commands.adb_command() + ['shell'] | 1066 return self._android_commands.adb_command() + ['shell'] |
| 1067 | 1067 |
| 1068 def _android_driver_cmd_line(self, pixel_tests, per_test_args): | 1068 def _android_driver_cmd_line(self, pixel_tests, per_test_args): |
| 1069 return driver.Driver.cmd_line(self, pixel_tests, per_test_args) | 1069 # FIXME: We can't enable slimming paint before crbug.com/439457 is fixed
. |
| 1070 cmd_line = driver.Driver.cmd_line(self, pixel_tests, per_test_args) |
| 1071 if '--enable-slimming-paint' in cmd_line: |
| 1072 _log.warning('Android port doesn\'t support slimming paint because o
f crbug.com/439457') |
| 1073 cmd_line.remove('--enable-slimming-paint') |
| 1074 return cmd_line |
| 1070 | 1075 |
| 1071 @staticmethod | 1076 @staticmethod |
| 1072 def _loop_with_timeout(condition, timeout_secs): | 1077 def _loop_with_timeout(condition, timeout_secs): |
| 1073 deadline = time.time() + timeout_secs | 1078 deadline = time.time() + timeout_secs |
| 1074 while time.time() < deadline: | 1079 while time.time() < deadline: |
| 1075 if condition(): | 1080 if condition(): |
| 1076 return True | 1081 return True |
| 1077 return False | 1082 return False |
| 1078 | 1083 |
| 1079 def _all_pipes_created(self): | 1084 def _all_pipes_created(self): |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 return command | 1291 return command |
| 1287 | 1292 |
| 1288 def _read_prompt(self, deadline): | 1293 def _read_prompt(self, deadline): |
| 1289 last_char = '' | 1294 last_char = '' |
| 1290 while True: | 1295 while True: |
| 1291 current_char = self._server_process.read_stdout(deadline, 1) | 1296 current_char = self._server_process.read_stdout(deadline, 1) |
| 1292 if current_char == ' ': | 1297 if current_char == ' ': |
| 1293 if last_char in ('#', '$'): | 1298 if last_char in ('#', '$'): |
| 1294 return | 1299 return |
| 1295 last_char = current_char | 1300 last_char = current_char |
| OLD | NEW |