| 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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1309 |
| 1310 for path in self.get_option('additional_expectations', []): | 1310 for path in self.get_option('additional_expectations', []): |
| 1311 expanded_path = self._filesystem.expanduser(path) | 1311 expanded_path = self._filesystem.expanduser(path) |
| 1312 if self._filesystem.exists(expanded_path): | 1312 if self._filesystem.exists(expanded_path): |
| 1313 _log.debug("reading additional_expectations from path '%s'", pat
h) | 1313 _log.debug("reading additional_expectations from path '%s'", pat
h) |
| 1314 expectations[path] = self._filesystem.read_text_file(expanded_pa
th) | 1314 expectations[path] = self._filesystem.read_text_file(expanded_pa
th) |
| 1315 else: | 1315 else: |
| 1316 _log.warning("additional_expectations path '%s' does not exist",
path) | 1316 _log.warning("additional_expectations path '%s' does not exist",
path) |
| 1317 return expectations | 1317 return expectations |
| 1318 | 1318 |
| 1319 def all_expectations_dict(self): |
| 1320 """Returns an OrderedDict of name -> expectations strings (see: |
| 1321 |expectations_dict|), including all flag-specific expectation files.""" |
| 1322 expectations = self.expectations_dict() |
| 1323 |
| 1324 flag_path = self._filesystem.join(self.layout_tests_dir(), 'FlagExpectat
ions') |
| 1325 if not self._filesystem.exists(flag_path): |
| 1326 return expectations |
| 1327 |
| 1328 for (_, _, filenames) in self._filesystem.walk(flag_path): |
| 1329 if 'README.txt' in filenames: |
| 1330 filenames.remove('README.txt') |
| 1331 for filename in filenames: |
| 1332 path = self._filesystem.join(flag_path, filename) |
| 1333 expectations[path] = self._filesystem.read_text_file(path) |
| 1334 |
| 1335 return expectations |
| 1336 |
| 1319 def bot_expectations(self): | 1337 def bot_expectations(self): |
| 1320 if not self.get_option('ignore_flaky_tests'): | 1338 if not self.get_option('ignore_flaky_tests'): |
| 1321 return {} | 1339 return {} |
| 1322 | 1340 |
| 1323 full_port_name = self.determine_full_port_name(self.host, self._options,
self.port_name) | 1341 full_port_name = self.determine_full_port_name(self.host, self._options,
self.port_name) |
| 1324 builder_category = self.get_option('ignore_builder_category', 'layout') | 1342 builder_category = self.get_option('ignore_builder_category', 'layout') |
| 1325 factory = BotTestExpectationsFactory(self.host.builders) | 1343 factory = BotTestExpectationsFactory(self.host.builders) |
| 1326 # FIXME: This only grabs release builder's flakiness data. If we're runn
ing debug, | 1344 # FIXME: This only grabs release builder's flakiness data. If we're runn
ing debug, |
| 1327 # when we should grab the debug builder's data. | 1345 # when we should grab the debug builder's data. |
| 1328 expectations = factory.expectations_for_port(full_port_name, builder_cat
egory) | 1346 expectations = factory.expectations_for_port(full_port_name, builder_cat
egory) |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1814 | 1832 |
| 1815 def __init__(self, base, args, reference_args=None): | 1833 def __init__(self, base, args, reference_args=None): |
| 1816 self.name = base | 1834 self.name = base |
| 1817 self.base = base | 1835 self.base = base |
| 1818 self.args = args | 1836 self.args = args |
| 1819 self.reference_args = args if reference_args is None else reference_args | 1837 self.reference_args = args if reference_args is None else reference_args |
| 1820 self.tests = set() | 1838 self.tests = set() |
| 1821 | 1839 |
| 1822 def __repr__(self): | 1840 def __repr__(self): |
| 1823 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1841 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |