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

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

Issue 2644783003: Regenerate MANIFEST.json when WPT tests are run (Closed)
Patch Set: Simplify MANIFEST.json regeneration, just say the file might have changed 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 url = manifest_items[0][0] 749 url = manifest_items[0][0]
750 if url[1:] != path_in_wpt: 750 if url[1:] != path_in_wpt:
751 # TODO(tkent): foo.any.js and bar.worker.js should be accessed 751 # TODO(tkent): foo.any.js and bar.worker.js should be accessed
752 # as foo.any.html, foo.any.worker, and bar.worker with WPTServe. 752 # as foo.any.html, foo.any.worker, and bar.worker with WPTServe.
753 continue 753 continue
754 tests.append(file_path) 754 tests.append(file_path)
755 return tests 755 return tests
756 756
757 @memoized 757 @memoized
758 def _wpt_manifest(self): 758 def _wpt_manifest(self):
759 path = self._filesystem.join(self.layout_tests_dir(), 'external', 'wpt', 'MANIFEST.json') 759 manifest_path = self._filesystem.join(self.layout_tests_dir(), 'external ', 'wpt', 'MANIFEST.json')
760 return json.loads(self._filesystem.read_text_file(path)) 760 self._generate_manifest()
761 return json.loads(self._filesystem.read_text_file(manifest_path))
762
763 def _generate_manifest(self):
764 wpt_path = self._webkit_finder.path_from_webkit_base('LayoutTests', 'ext ernal', 'wpt')
765 manifest_tool_path = self._webkit_finder.path_from_webkit_base(
766 'Tools', 'Scripts', 'webkitpy', 'thirdparty', 'wpt', 'wpt', 'manifes t')
767 _log.info(('Generating MANIFEST.json, this might result in changes ',
768 'to MANIFEST.json in your working directory. Please commit th em along ',
769 'with your changes. See https://crbug.com/666957.'))
qyearsley 2017/01/27 23:24:49 Can you call log methods with a tuple like this? I
770 self._executive.run_command([manifest_tool_path, '--work', '--tests-root ', wpt_path])
761 771
762 def _manifest_items_for_path(self, path_in_wpt): 772 def _manifest_items_for_path(self, path_in_wpt):
763 """Returns a manifest item for the given WPT path, or None if not found. 773 """Returns a manifest item for the given WPT path, or None if not found.
764 774
765 The format of a manifest item depends on 775 The format of a manifest item depends on
766 https://github.com/w3c/wpt-tools/blob/master/manifest/item.py 776 https://github.com/w3c/wpt-tools/blob/master/manifest/item.py
767 and is assumed to be a list of the format [url, extras], 777 and is assumed to be a list of the format [url, extras],
768 or [url, references, extras] for reftests, or None if not found. 778 or [url, references, extras] for reftests, or None if not found.
769 779
770 For most testharness tests, the returned manifest_items is expected 780 For most testharness tests, the returned manifest_items is expected
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 1686
1677 def __init__(self, base, args, reference_args=None): 1687 def __init__(self, base, args, reference_args=None):
1678 self.name = base 1688 self.name = base
1679 self.base = base 1689 self.base = base
1680 self.args = args 1690 self.args = args
1681 self.reference_args = args if reference_args is None else reference_args 1691 self.reference_args = args if reference_args is None else reference_args
1682 self.tests = set() 1692 self.tests = set()
1683 1693
1684 def __repr__(self): 1694 def __repr__(self):
1685 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1695 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/base_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698