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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_server.py

Issue 2671583002: Revert of Simplify the initialization of Git objects in Host. (Closed)
Patch Set: 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 result_dict['state'] = STATE_NEEDS_REBASELINE 75 result_dict['state'] = STATE_NEEDS_REBASELINE
76 result_dict['baselines'] = get_test_baselines(result.test_name(), se lf._test_config) 76 result_dict['baselines'] = get_test_baselines(result.test_name(), se lf._test_config)
77 new_tests_subtree[result.test_name()] = result_dict 77 new_tests_subtree[result.test_name()] = result_dict
78 78
79 LayoutTestResults(results_json).for_each_test(gather_baselines_for_test) 79 LayoutTestResults(results_json).for_each_test(gather_baselines_for_test)
80 results_json['tests'] = new_tests_subtree 80 results_json['tests'] = new_tests_subtree
81 81
82 def _prepare_config(self, options, args, tool): 82 def _prepare_config(self, options, args, tool):
83 results_directory = args[0] 83 results_directory = args[0]
84 host = Host() 84 host = Host()
85 host.initialize_scm()
85 86
86 print 'Parsing full_results.json...' 87 print 'Parsing full_results.json...'
87 results_json_path = host.filesystem.join(results_directory, 'full_result s.json') 88 results_json_path = host.filesystem.join(results_directory, 'full_result s.json')
88 results_json = json_results_generator.load_json(host.filesystem, results _json_path) 89 results_json = json_results_generator.load_json(host.filesystem, results _json_path)
89 90
90 port = tool.port_factory.get() 91 port = tool.port_factory.get()
91 layout_tests_directory = port.layout_tests_dir() 92 layout_tests_directory = port.layout_tests_dir()
92 platforms = host.filesystem.listdir(host.filesystem.join(layout_tests_di rectory, 'platform')) 93 platforms = host.filesystem.listdir(host.filesystem.join(layout_tests_di rectory, 'platform'))
93 self._test_config = TestConfig(port, layout_tests_directory, results_dir ectory, platforms, host) 94 self._test_config = TestConfig(port, layout_tests_directory, results_dir ectory, platforms, host)
94 95
95 print 'Gathering current baselines...' 96 print 'Gathering current baselines...'
96 self._gather_baselines(results_json) 97 self._gather_baselines(results_json)
97 98
98 return { 99 return {
99 'test_config': self._test_config, 100 'test_config': self._test_config,
100 "results_json": results_json, 101 "results_json": results_json,
101 "platforms_json": { 102 "platforms_json": {
102 'platforms': platforms, 103 'platforms': platforms,
103 'defaultPlatform': port.name(), 104 'defaultPlatform': port.name(),
104 }, 105 },
105 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698