Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2455883004: Rename _webkit_baseline_path -> _absolute_baseline_path. (Closed)
Patch Set: Rename _webkit_baseline_path -> _absolute_baseline_path. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 def baseline_search_path(self): 298 def baseline_search_path(self):
299 return (self.get_option('additional_platform_directory', []) + 299 return (self.get_option('additional_platform_directory', []) +
300 self._flag_specific_baseline_search_path() + 300 self._flag_specific_baseline_search_path() +
301 self._compare_baseline() + 301 self._compare_baseline() +
302 self.default_baseline_search_path()) 302 self.default_baseline_search_path())
303 303
304 def default_baseline_search_path(self): 304 def default_baseline_search_path(self):
305 """Return a list of absolute paths to directories to search under for 305 """Return a list of absolute paths to directories to search under for
306 baselines. The directories are searched in order. 306 baselines. The directories are searched in order.
307 """ 307 """
308 return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version( )]) 308 return map(self._absolute_baseline_path, self.FALLBACK_PATHS[self.versio n()])
309 309
310 @memoized 310 @memoized
311 def _compare_baseline(self): 311 def _compare_baseline(self):
312 factory = PortFactory(self.host) 312 factory = PortFactory(self.host)
313 target_port = self.get_option('compare_port') 313 target_port = self.get_option('compare_port')
314 if target_port: 314 if target_port:
315 return factory.get(target_port).default_baseline_search_path() 315 return factory.get(target_port).default_baseline_search_path()
316 return [] 316 return []
317 317
318 def _check_file_exists(self, path_to_file, file_description, 318 def _check_file_exists(self, path_to_file, file_description,
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 line = line.strip() 947 line = line.strip()
948 line = line.rstrip('/') # Best to normalize directory names to not include the trailing slash. 948 line = line.rstrip('/') # Best to normalize directory names to not include the trailing slash.
949 if line.startswith('#') or not len(line): 949 if line.startswith('#') or not len(line):
950 continue 950 continue
951 tests_to_skip.append(line) 951 tests_to_skip.append(line)
952 return tests_to_skip 952 return tests_to_skip
953 953
954 def _expectations_from_skipped_files(self, skipped_file_paths): 954 def _expectations_from_skipped_files(self, skipped_file_paths):
955 tests_to_skip = [] 955 tests_to_skip = []
956 for search_path in skipped_file_paths: 956 for search_path in skipped_file_paths:
957 filename = self._filesystem.join(self._webkit_baseline_path(search_p ath), "Skipped") 957 filename = self._filesystem.join(self._absolute_baseline_path(search _path), "Skipped")
958 if not self._filesystem.exists(filename): 958 if not self._filesystem.exists(filename):
959 _log.debug("Skipped does not exist: %s", filename) 959 _log.debug("Skipped does not exist: %s", filename)
960 continue 960 continue
961 _log.debug("Using Skipped file: %s", filename) 961 _log.debug("Using Skipped file: %s", filename)
962 skipped_file_contents = self._filesystem.read_text_file(filename) 962 skipped_file_contents = self._filesystem.read_text_file(filename)
963 tests_to_skip.extend(self._tests_from_skipped_file_contents(skipped_ file_contents)) 963 tests_to_skip.extend(self._tests_from_skipped_file_contents(skipped_ file_contents))
964 return tests_to_skip 964 return tests_to_skip
965 965
966 @memoized 966 @memoized
967 def skipped_perf_tests(self): 967 def skipped_perf_tests(self):
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 def _path_to_wdiff(self): 1551 def _path_to_wdiff(self):
1552 """Returns the full path to the wdiff binary, or None if it is not avail able. 1552 """Returns the full path to the wdiff binary, or None if it is not avail able.
1553 1553
1554 This is likely used only by wdiff_text() 1554 This is likely used only by wdiff_text()
1555 """ 1555 """
1556 for path in ("/usr/bin/wdiff", "/usr/bin/dwdiff"): 1556 for path in ("/usr/bin/wdiff", "/usr/bin/dwdiff"):
1557 if self._filesystem.exists(path): 1557 if self._filesystem.exists(path):
1558 return path 1558 return path
1559 return None 1559 return None
1560 1560
1561 def _webkit_baseline_path(self, platform): 1561 def _absolute_baseline_path(self, platform_dir):
1562 """Return the full path to the top of the baseline tree for a 1562 """Return the absolute path to the top of the baseline tree for a
1563 given platform. 1563 given platform directory.
1564 """ 1564 """
1565 return self._filesystem.join(self.layout_tests_dir(), 'platform', platfo rm) 1565 return self._filesystem.join(self.layout_tests_dir(), 'platform', platfo rm_dir)
1566 1566
1567 def _driver_class(self): 1567 def _driver_class(self):
1568 """Returns the port's driver implementation.""" 1568 """Returns the port's driver implementation."""
1569 return driver.Driver 1569 return driver.Driver
1570 1570
1571 def output_contains_sanitizer_messages(self, output): 1571 def output_contains_sanitizer_messages(self, output):
1572 if not output: 1572 if not output:
1573 return None 1573 return None
1574 if 'AddressSanitizer' in output: 1574 if 'AddressSanitizer' in output:
1575 return 'AddressSanitizer' 1575 return 'AddressSanitizer'
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 1838
1839 def __init__(self, base, args, reference_args=None): 1839 def __init__(self, base, args, reference_args=None):
1840 self.name = base 1840 self.name = base
1841 self.base = base 1841 self.base = base
1842 self.args = args 1842 self.args = args
1843 self.reference_args = args if reference_args is None else reference_args 1843 self.reference_args = args if reference_args is None else reference_args
1844 self.tests = set() 1844 self.tests = set()
1845 1845
1846 def __repr__(self): 1846 def __repr__(self):
1847 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1847 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698