| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 import collections | 35 import collections |
| 36 import errno | 36 import errno |
| 37 import functools | 37 import functools |
| 38 import json | 38 import json |
| 39 import logging | 39 import logging |
| 40 import optparse | 40 import optparse |
| 41 import re | 41 import re |
| 42 import sys | 42 import sys |
| 43 | 43 |
| 44 from webkitpy.common import exit_codes |
| 44 from webkitpy.common import find_files | 45 from webkitpy.common import find_files |
| 45 from webkitpy.common import read_checksum_from_png | 46 from webkitpy.common import read_checksum_from_png |
| 46 from webkitpy.common.memoized import memoized | 47 from webkitpy.common.memoized import memoized |
| 47 from webkitpy.common.system.executive import ScriptError | 48 from webkitpy.common.system.executive import ScriptError |
| 48 from webkitpy.common.system.path import cygpath, abspath_to_uri | 49 from webkitpy.common.system.path import cygpath, abspath_to_uri |
| 49 from webkitpy.common.webkit_finder import WebKitFinder | 50 from webkitpy.common.webkit_finder import WebKitFinder |
| 50 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 51 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
| 51 from webkitpy.layout_tests.models import test_run_results | 52 from webkitpy.layout_tests.models import test_run_results |
| 52 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 53 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
| 53 from webkitpy.layout_tests.models.test_expectations import SKIP | 54 from webkitpy.layout_tests.models.test_expectations import SKIP |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 323 |
| 323 # It's okay if pretty patch isn't available, but we will at least log me
ssages. | 324 # It's okay if pretty patch isn't available, but we will at least log me
ssages. |
| 324 self._pretty_patch_available = self.check_pretty_patch() | 325 self._pretty_patch_available = self.check_pretty_patch() |
| 325 | 326 |
| 326 if self._dump_reader: | 327 if self._dump_reader: |
| 327 result = self._dump_reader.check_is_functional() and result | 328 result = self._dump_reader.check_is_functional() and result |
| 328 | 329 |
| 329 if needs_http: | 330 if needs_http: |
| 330 result = self.check_httpd() and result | 331 result = self.check_httpd() and result |
| 331 | 332 |
| 332 return test_run_results.OK_EXIT_STATUS if result else test_run_results.U
NEXPECTED_ERROR_EXIT_STATUS | 333 return exit_codes.OK_EXIT_STATUS if result else exit_codes.UNEXPECTED_ER
ROR_EXIT_STATUS |
| 333 | 334 |
| 334 def _check_driver(self): | 335 def _check_driver(self): |
| 335 driver_path = self._path_to_driver() | 336 driver_path = self._path_to_driver() |
| 336 if not self._filesystem.exists(driver_path): | 337 if not self._filesystem.exists(driver_path): |
| 337 _log.error('%s was not found at %s', self.driver_name(), driver_path
) | 338 _log.error('%s was not found at %s', self.driver_name(), driver_path
) |
| 338 return False | 339 return False |
| 339 return True | 340 return True |
| 340 | 341 |
| 341 def check_sys_deps(self, needs_http): | 342 def check_sys_deps(self, needs_http): |
| 342 """Checks whether the system is properly configured. | 343 """Checks whether the system is properly configured. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 358 output = self._executive.run_command(cmd, error_handler=error_handler) | 359 output = self._executive.run_command(cmd, error_handler=error_handler) |
| 359 if local_error.exit_code: | 360 if local_error.exit_code: |
| 360 _log.error('System dependencies check failed.') | 361 _log.error('System dependencies check failed.') |
| 361 _log.error('To override, invoke with --nocheck-sys-deps') | 362 _log.error('To override, invoke with --nocheck-sys-deps') |
| 362 _log.error('') | 363 _log.error('') |
| 363 _log.error(output) | 364 _log.error(output) |
| 364 if self.BUILD_REQUIREMENTS_URL is not '': | 365 if self.BUILD_REQUIREMENTS_URL is not '': |
| 365 _log.error('') | 366 _log.error('') |
| 366 _log.error('For complete build requirements, please see:') | 367 _log.error('For complete build requirements, please see:') |
| 367 _log.error(self.BUILD_REQUIREMENTS_URL) | 368 _log.error(self.BUILD_REQUIREMENTS_URL) |
| 368 return test_run_results.SYS_DEPS_EXIT_STATUS | 369 return exit_codes.SYS_DEPS_EXIT_STATUS |
| 369 return test_run_results.OK_EXIT_STATUS | 370 return exit_codes.OK_EXIT_STATUS |
| 370 | 371 |
| 371 def check_image_diff(self): | 372 def check_image_diff(self): |
| 372 """Checks whether image_diff binary exists.""" | 373 """Checks whether image_diff binary exists.""" |
| 373 image_diff_path = self._path_to_image_diff() | 374 image_diff_path = self._path_to_image_diff() |
| 374 if not self._filesystem.exists(image_diff_path): | 375 if not self._filesystem.exists(image_diff_path): |
| 375 _log.error('image_diff was not found at %s', image_diff_path) | 376 _log.error('image_diff was not found at %s', image_diff_path) |
| 376 return False | 377 return False |
| 377 return True | 378 return True |
| 378 | 379 |
| 379 def check_pretty_patch(self, more_logging=True): | 380 def check_pretty_patch(self, more_logging=True): |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 | 1640 |
| 1640 def __init__(self, base, args, reference_args=None): | 1641 def __init__(self, base, args, reference_args=None): |
| 1641 self.name = base | 1642 self.name = base |
| 1642 self.base = base | 1643 self.base = base |
| 1643 self.args = args | 1644 self.args = args |
| 1644 self.reference_args = args if reference_args is None else reference_args | 1645 self.reference_args = args if reference_args is None else reference_args |
| 1645 self.tests = set() | 1646 self.tests = set() |
| 1646 | 1647 |
| 1647 def __repr__(self): | 1648 def __repr__(self): |
| 1648 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1649 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |