| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 def driver_stop_timeout(self): | 472 def driver_stop_timeout(self): |
| 473 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. | 473 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. |
| 474 return 0.0 | 474 return 0.0 |
| 475 | 475 |
| 476 def default_child_processes(self): | 476 def default_child_processes(self): |
| 477 usable_devices = self._devices.usable_devices(self._executive) | 477 usable_devices = self._devices.usable_devices(self._executive) |
| 478 if not usable_devices: | 478 if not usable_devices: |
| 479 raise test_run_results.TestRunException(test_run_results.NO_DEVICES_
EXIT_STATUS, "Unable to find any attached Android devices.") | 479 raise test_run_results.TestRunException(test_run_results.NO_DEVICES_
EXIT_STATUS, "Unable to find any attached Android devices.") |
| 480 return len(usable_devices) | 480 return len(usable_devices) |
| 481 | 481 |
| 482 def max_drivers_per_process(self): |
| 483 # Android falls over when we try to run multiple content_shells per work
er. |
| 484 # See https://codereview.chromium.org/1158323009/ |
| 485 return 1 |
| 486 |
| 482 def check_wdiff(self, logging=True): | 487 def check_wdiff(self, logging=True): |
| 483 return self._host_port.check_wdiff(logging) | 488 return self._host_port.check_wdiff(logging) |
| 484 | 489 |
| 485 def check_build(self, needs_http, printer): | 490 def check_build(self, needs_http, printer): |
| 486 exit_status = super(AndroidPort, self).check_build(needs_http, printer) | 491 exit_status = super(AndroidPort, self).check_build(needs_http, printer) |
| 487 if exit_status: | 492 if exit_status: |
| 488 return exit_status | 493 return exit_status |
| 489 | 494 |
| 490 result = self._check_file_exists(self.path_to_md5sum(), 'md5sum utility'
) | 495 result = self._check_file_exists(self.path_to_md5sum(), 'md5sum utility'
) |
| 491 result = self._check_file_exists(self.path_to_md5sum_host(), 'md5sum hos
t utility') and result | 496 result = self._check_file_exists(self.path_to_md5sum_host(), 'md5sum hos
t utility') and result |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 return command | 1286 return command |
| 1282 | 1287 |
| 1283 def _read_prompt(self, deadline): | 1288 def _read_prompt(self, deadline): |
| 1284 last_char = '' | 1289 last_char = '' |
| 1285 while True: | 1290 while True: |
| 1286 current_char = self._server_process.read_stdout(deadline, 1) | 1291 current_char = self._server_process.read_stdout(deadline, 1) |
| 1287 if current_char == ' ': | 1292 if current_char == ' ': |
| 1288 if last_char in ('#', '$'): | 1293 if last_char in ('#', '$'): |
| 1289 return | 1294 return |
| 1290 last_char = current_char | 1295 last_char = current_char |
| OLD | NEW |