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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

Issue 2722243005: Ensure manifest exists in Port._wpt_manifest. (Closed)
Patch Set: Call ensure manifest in rebaseline-cl Created 3 years, 9 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/controllers/manager_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 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 self._finder = LayoutTestFinder(self._port, self._options) 92 self._finder = LayoutTestFinder(self._port, self._options)
93 self._webkit_finder = WebKitFinder(port.host.filesystem) 93 self._webkit_finder = WebKitFinder(port.host.filesystem)
94 self._runner = LayoutTestRunner(self._options, self._port, self._printer , self._results_directory, self._test_is_slow) 94 self._runner = LayoutTestRunner(self._options, self._port, self._printer , self._results_directory, self._test_is_slow)
95 95
96 def run(self, args): 96 def run(self, args):
97 """Run the tests and return a RunDetails object with the results.""" 97 """Run the tests and return a RunDetails object with the results."""
98 start_time = time.time() 98 start_time = time.time()
99 self._printer.write_update("Collecting tests ...") 99 self._printer.write_update("Collecting tests ...")
100 running_all_tests = False 100 running_all_tests = False
101 101
102 # Regenerate MANIFEST.json from template, necessary for web-platform-tes ts metadata. 102 self._printer.write_update('Generating MANIFEST.json for web-platform-te sts ...')
103 self._ensure_manifest() 103 WPTManifest.ensure_manifest(self._port.host)
104 104
105 try: 105 try:
106 paths, all_test_names, running_all_tests = self._collect_tests(args) 106 paths, all_test_names, running_all_tests = self._collect_tests(args)
107 except IOError: 107 except IOError:
108 # This is raised if --test-list doesn't exist 108 # This is raised if --test-list doesn't exist
109 return test_run_results.RunDetails(exit_code=test_run_results.NO_TES TS_EXIT_STATUS) 109 return test_run_results.RunDetails(exit_code=test_run_results.NO_TES TS_EXIT_STATUS)
110 110
111 # Create a sorted list of test files so the subset chunk, 111 # Create a sorted list of test files so the subset chunk,
112 # if used, contains alphabetically consecutive tests. 112 # if used, contains alphabetically consecutive tests.
113 if self._options.order == 'natural': 113 if self._options.order == 'natural':
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 stats = {} 546 stats = {}
547 for result in initial_results.results_by_name.values(): 547 for result in initial_results.results_by_name.values():
548 if result.type != test_expectations.SKIP: 548 if result.type != test_expectations.SKIP:
549 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int( 549 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int(
550 result.test_run_time * 1000), int(result.total_run_time * 10 00))} 550 result.test_run_time * 1000), int(result.total_run_time * 10 00))}
551 stats_trie = {} 551 stats_trie = {}
552 for name, value in stats.iteritems(): 552 for name, value in stats.iteritems():
553 json_results_generator.add_path_to_trie(name, value, stats_trie) 553 json_results_generator.add_path_to_trie(name, value, stats_trie)
554 return stats_trie 554 return stats_trie
555
556 def _ensure_manifest(self):
557 fs = self._filesystem
558 external_path = self._webkit_finder.path_from_webkit_base('LayoutTests', 'external')
559 wpt_path = fs.join(external_path, 'wpt')
560 manifest_path = fs.join(external_path, 'wpt', 'MANIFEST.json')
561 base_manifest_path = fs.join(external_path, 'WPT_BASE_MANIFEST.json')
562
563 if not self._filesystem.exists(manifest_path):
564 fs.copyfile(base_manifest_path, manifest_path)
565
566 self._printer.write_update('Generating MANIFEST.json for web-platform-te sts ...')
567
568 # TODO(jeffcarp): handle errors
569 WPTManifest.generate_manifest(self._port.host, wpt_path)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698