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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 if not exists: | 594 if not exists: |
595 _log.error('You are missing %s under %s. Try installing %s. See
build instructions.' % (font_file, font_dirs, package)) | 595 _log.error('You are missing %s under %s. Try installing %s. See
build instructions.' % (font_file, font_dirs, package)) |
596 return test_run_results.SYS_DEPS_EXIT_STATUS | 596 return test_run_results.SYS_DEPS_EXIT_STATUS |
597 return test_run_results.OK_EXIT_STATUS | 597 return test_run_results.OK_EXIT_STATUS |
598 | 598 |
599 def requires_http_server(self): | 599 def requires_http_server(self): |
600 """Chromium Android runs tests on devices, and uses the HTTP server to | 600 """Chromium Android runs tests on devices, and uses the HTTP server to |
601 serve the actual layout tests to the test driver.""" | 601 serve the actual layout tests to the test driver.""" |
602 return True | 602 return True |
603 | 603 |
604 def start_http_server(self, additional_dirs=None, number_of_drivers=0): | 604 def start_http_server(self, additional_dirs, number_of_drivers): |
605 if not additional_dirs: | |
606 additional_dirs = {} | |
607 additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir() | 605 additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir() |
608 additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir() | 606 additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir() |
609 super(AndroidPort, self).start_http_server(additional_dirs, number_of_dr
ivers) | 607 super(AndroidPort, self).start_http_server(additional_dirs, number_of_dr
ivers) |
610 | 608 |
611 def create_driver(self, worker_number, no_timeout=False): | 609 def create_driver(self, worker_number, no_timeout=False): |
612 return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_o
ption('pixel_tests'), | 610 return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_o
ption('pixel_tests'), |
613 driver_details=self._driver_details, | 611 driver_details=self._driver_details, |
614 android_devices=self._devices, | 612 android_devices=self._devices, |
615 # Force no timeout to avoid test driver tim
eouts before NRWT. | 613 # Force no timeout to avoid test driver tim
eouts before NRWT. |
616 no_timeout=True) | 614 no_timeout=True) |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 return command | 1275 return command |
1278 | 1276 |
1279 def _read_prompt(self, deadline): | 1277 def _read_prompt(self, deadline): |
1280 last_char = '' | 1278 last_char = '' |
1281 while True: | 1279 while True: |
1282 current_char = self._server_process.read_stdout(deadline, 1) | 1280 current_char = self._server_process.read_stdout(deadline, 1) |
1283 if current_char == ' ': | 1281 if current_char == ' ': |
1284 if last_char in ('#', '$'): | 1282 if last_char in ('#', '$'): |
1285 return | 1283 return |
1286 last_char = current_char | 1284 last_char = current_char |
OLD | NEW |