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

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

Issue 2656813002: run-webkit-tests: Extract slowness information from MANIFEST.json. (Closed)
Patch Set: Improve regex matching, add _get_extras_from_manifest_item() Created 3 years, 11 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 """ 755 """
756 items = self._wpt_manifest()['items'] 756 items = self._wpt_manifest()['items']
757 if path_in_wpt in items['manual']: 757 if path_in_wpt in items['manual']:
758 return items['manual'][path_in_wpt] 758 return items['manual'][path_in_wpt]
759 elif path_in_wpt in items['reftest']: 759 elif path_in_wpt in items['reftest']:
760 return items['reftest'][path_in_wpt] 760 return items['reftest'][path_in_wpt]
761 elif path_in_wpt in items['testharness']: 761 elif path_in_wpt in items['testharness']:
762 return items['testharness'][path_in_wpt] 762 return items['testharness'][path_in_wpt]
763 return None 763 return None
764 764
765 @staticmethod
766 def _get_extras_from_manifest_item(item):
767 return item[-1]
768
769 def is_slow_wpt_test(self, test_file):
770 match = re.match(r'external/wpt/(.*)', test_file)
771 if not match:
772 return False
773 items = self._manifest_items_for_path(match.group(1))
774 if not items:
775 return False
776 extras = Port._get_extras_from_manifest_item(items[0])
777 return 'timeout' in extras and extras['timeout'] == 'long'
778
765 ALL_TEST_TYPES = ['audio', 'harness', 'pixel', 'ref', 'text', 'unknown'] 779 ALL_TEST_TYPES = ['audio', 'harness', 'pixel', 'ref', 'text', 'unknown']
766 780
767 def test_type(self, test_name): 781 def test_type(self, test_name):
768 fs = self._filesystem 782 fs = self._filesystem
769 if fs.exists(self.expected_filename(test_name, '.png')): 783 if fs.exists(self.expected_filename(test_name, '.png')):
770 return 'pixel' 784 return 'pixel'
771 if fs.exists(self.expected_filename(test_name, '.wav')): 785 if fs.exists(self.expected_filename(test_name, '.wav')):
772 return 'audio' 786 return 'audio'
773 if self.reference_files(test_name): 787 if self.reference_files(test_name):
774 return 'ref' 788 return 'ref'
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 1659
1646 def __init__(self, base, args, reference_args=None): 1660 def __init__(self, base, args, reference_args=None):
1647 self.name = base 1661 self.name = base
1648 self.base = base 1662 self.base = base
1649 self.args = args 1663 self.args = args
1650 self.reference_args = args if reference_args is None else reference_args 1664 self.reference_args = args if reference_args is None else reference_args
1651 self.tests = set() 1665 self.tests = set()
1652 1666
1653 def __repr__(self): 1667 def __repr__(self):
1654 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1668 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