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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 for font_dir in font_dirs: | 591 for font_dir in font_dirs: |
592 font_path = font_dir + font_file | 592 font_path = font_dir + font_file |
593 if self._check_file_exists(font_path, '', logging=False): | 593 if self._check_file_exists(font_path, '', logging=False): |
594 exists = True | 594 exists = True |
595 break | 595 break |
596 if not exists: | 596 if not exists: |
597 _log.error('You are missing %s under %s. Try installing %s. See
build instructions.' % (font_file, font_dirs, package)) | 597 _log.error('You are missing %s under %s. Try installing %s. See
build instructions.' % (font_file, font_dirs, package)) |
598 return test_run_results.SYS_DEPS_EXIT_STATUS | 598 return test_run_results.SYS_DEPS_EXIT_STATUS |
599 return test_run_results.OK_EXIT_STATUS | 599 return test_run_results.OK_EXIT_STATUS |
600 | 600 |
601 def requires_http_server(self): | 601 def requires_sky_server(self): |
602 """Chromium Android runs tests on devices, and uses the HTTP server to | 602 """Chromium Android runs tests on devices, and uses the HTTP server to |
603 serve the actual layout tests to the test driver.""" | 603 serve the actual layout tests to the test driver.""" |
604 return True | 604 return True |
605 | 605 |
606 def start_http_server(self, additional_dirs, number_of_drivers): | 606 def start_sky_server(self, additional_dirs, number_of_drivers): |
607 additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir() | 607 additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir() |
608 additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir() | 608 additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir() |
609 super(AndroidPort, self).start_http_server(additional_dirs, number_of_dr
ivers) | 609 super(AndroidPort, self).start_sky_server(additional_dirs, number_of_dri
vers) |
610 | 610 |
611 def create_driver(self, worker_number, no_timeout=False): | 611 def create_driver(self, worker_number, no_timeout=False): |
612 return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_o
ption('pixel_tests'), | 612 return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_o
ption('pixel_tests'), |
613 driver_details=self._driver_details, | 613 driver_details=self._driver_details, |
614 android_devices=self._devices, | 614 android_devices=self._devices, |
615 # Force no timeout to avoid test driver tim
eouts before NRWT. | 615 # Force no timeout to avoid test driver tim
eouts before NRWT. |
616 no_timeout=True) | 616 no_timeout=True) |
617 | 617 |
618 def driver_cmd_line(self): | 618 def driver_cmd_line(self): |
619 # Override to return the actual test driver's command line. | 619 # Override to return the actual test driver's command line. |
(...skipping 22 matching lines...) Expand all Loading... |
642 | 642 |
643 def _path_to_helper(self): | 643 def _path_to_helper(self): |
644 return None | 644 return None |
645 | 645 |
646 def _path_to_image_diff(self): | 646 def _path_to_image_diff(self): |
647 return self._host_port._path_to_image_diff() | 647 return self._host_port._path_to_image_diff() |
648 | 648 |
649 def _path_to_wdiff(self): | 649 def _path_to_wdiff(self): |
650 return self._host_port._path_to_wdiff() | 650 return self._host_port._path_to_wdiff() |
651 | 651 |
652 def _shut_down_http_server(self, pid): | 652 def _shut_down_sky_server(self, pid): |
653 return self._host_port._shut_down_http_server(pid) | 653 return self._host_port._shut_down_sky_server(pid) |
654 | 654 |
655 def _driver_class(self): | 655 def _driver_class(self): |
656 return ChromiumAndroidDriver | 656 return ChromiumAndroidDriver |
657 | 657 |
658 # Local private methods. | 658 # Local private methods. |
659 | 659 |
660 @staticmethod | 660 @staticmethod |
661 def _android_server_process_constructor(port, server_name, cmd_line, env=Non
e, logging=False): | 661 def _android_server_process_constructor(port, server_name, cmd_line, env=Non
e, logging=False): |
662 return server_process.ServerProcess(port, server_name, cmd_line, env, | 662 return server_process.ServerProcess(port, server_name, cmd_line, env, |
663 universal_newlines=True, treat_no_da
ta_as_crash=True, logging=logging) | 663 universal_newlines=True, treat_no_da
ta_as_crash=True, logging=logging) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 return command | 1268 return command |
1269 | 1269 |
1270 def _read_prompt(self, deadline): | 1270 def _read_prompt(self, deadline): |
1271 last_char = '' | 1271 last_char = '' |
1272 while True: | 1272 while True: |
1273 current_char = self._server_process.read_stdout(deadline, 1) | 1273 current_char = self._server_process.read_stdout(deadline, 1) |
1274 if current_char == ' ': | 1274 if current_char == ' ': |
1275 if last_char in ('#', '$'): | 1275 if last_char in ('#', '$'): |
1276 return | 1276 return |
1277 last_char = current_char | 1277 last_char = current_char |
OLD | NEW |