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

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

Issue 2687093005: WPT importer: Use concise lists of version specifiers in expectation lines. (Closed)
Patch Set: versions->version_specifiers, accept, upper-case macros, use issubset, mame -> name Created 3 years, 10 months 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
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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 tests_to_skip = [] 924 tests_to_skip = []
925 for line in skipped_file_contents.split('\n'): 925 for line in skipped_file_contents.split('\n'):
926 line = line.strip() 926 line = line.strip()
927 line = line.rstrip('/') # Best to normalize directory names to not include the trailing slash. 927 line = line.rstrip('/') # Best to normalize directory names to not include the trailing slash.
928 if line.startswith('#') or not len(line): 928 if line.startswith('#') or not len(line):
929 continue 929 continue
930 tests_to_skip.append(line) 930 tests_to_skip.append(line)
931 return tests_to_skip 931 return tests_to_skip
932 932
933 def _expectations_from_skipped_files(self, skipped_file_paths): 933 def _expectations_from_skipped_files(self, skipped_file_paths):
934 # TODO(qyearsley): Remove this if there are no more "Skipped" files.
934 tests_to_skip = [] 935 tests_to_skip = []
935 for search_path in skipped_file_paths: 936 for search_path in skipped_file_paths:
936 filename = self._filesystem.join(self._absolute_baseline_path(search _path), "Skipped") 937 filename = self._filesystem.join(self._absolute_baseline_path(search _path), "Skipped")
937 if not self._filesystem.exists(filename): 938 if not self._filesystem.exists(filename):
938 _log.debug("Skipped does not exist: %s", filename) 939 _log.debug("Skipped does not exist: %s", filename)
939 continue 940 continue
940 _log.debug("Using Skipped file: %s", filename) 941 _log.debug("Using Skipped file: %s", filename)
941 skipped_file_contents = self._filesystem.read_text_file(filename) 942 skipped_file_contents = self._filesystem.read_text_file(filename)
942 tests_to_skip.extend(self._tests_from_skipped_file_contents(skipped_ file_contents)) 943 tests_to_skip.extend(self._tests_from_skipped_file_contents(skipped_ file_contents))
943 return tests_to_skip 944 return tests_to_skip
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1635
1635 def __init__(self, base, args, reference_args=None): 1636 def __init__(self, base, args, reference_args=None):
1636 self.name = base 1637 self.name = base
1637 self.base = base 1638 self.base = base
1638 self.args = args 1639 self.args = args
1639 self.reference_args = args if reference_args is None else reference_args 1640 self.reference_args = args if reference_args is None else reference_args
1640 self.tests = set() 1641 self.tests = set()
1641 1642
1642 def __repr__(self): 1643 def __repr__(self):
1643 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698