def __init__(self, file_path, handle_style_error):
     self._file_path = file_path
     self._handle_style_error = handle_style_error
     self._tab_checker = TabChecker(file_path, handle_style_error)
     self._output_regex = re.compile('Line:(?P<line>\d+)\s*(?P<message>.+)')
     # Determining the port of this expectations.
     try:
         port_name = self._file_path.split(os.sep)[-2]
         if port_name == "chromium":
             options = ChromiumOptions()
             self._port_obj = port.get(port_name=None, options=options)
         else:
             self._port_obj = port.get(port_name=port_name)
     except:
         # Using 'test' port when we couldn't determine the port for this
         # expectations.
         _log.warn("Could not determine the port for %s. "
                   "Using 'test' port, but platform-specific expectations "
                   "will fail the check." % self._file_path)
         self._port_obj = port.get('test')
     self._port_to_check = self._port_obj.test_platform_name()
     # Suppress error messages of test_expectations module since they will be
     # reported later.
     log = logging.getLogger("webkitpy.layout_tests.layout_package."
                             "test_expectations")
     log.setLevel(logging.CRITICAL)
 def __init__(self, file_path, handle_style_error):
     self._file_path = file_path
     self._handle_style_error = handle_style_error
     self._tab_checker = TabChecker(file_path, handle_style_error)
     self._output_regex = re.compile('Line:(?P<line>\d+)\s*(?P<message>.+)')
     # Determining the port of this expectations.
     try:
         port_name = self._file_path.split(os.sep)[-2]
         if port_name == "chromium":
             options = ChromiumOptions()
             self._port_obj = port.get(port_name=None, options=options)
         else:
             self._port_obj = port.get(port_name=port_name)
     except:
         # Using 'test' port when we couldn't determine the port for this
         # expectations.
         _log.warn("Could not determine the port for %s. "
                   "Using 'test' port, but platform-specific expectations "
                   "will fail the check." % self._file_path)
         self._port_obj = port.get('test')
     self._port_to_check = self._port_obj.test_platform_name()
     # Suppress error messages of test_expectations module since they will be
     # reported later.
     log = logging.getLogger("webkitpy.layout_tests.layout_package."
                             "test_expectations")
     log.setLevel(logging.CRITICAL)
Example #3
0
 def setUp(self):
     self._error_collector = ErrorCollector()
     port_obj = port.get('test')
     self._test_file = os.path.join(port_obj.layout_tests_dir(), 'passes/text.html')
Example #4
0
 def setUp(self):
     self._error_collector = ErrorCollector()
     port_obj = port.get('test')
     self._test_file = port_obj._filesystem.join(
         port_obj.layout_tests_dir(), 'passes/text.html')