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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py

Issue 2818223002: Change GitCL to initialize git executable name on Windows. (Closed)
Patch Set: - Created 3 years, 8 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) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 self.buildbot = MockBuildBot() 62 self.buildbot = MockBuildBot()
63 63
64 # Note: We're using a real PortFactory here. Tests which don't wish to d epend 64 # Note: We're using a real PortFactory here. Tests which don't wish to d epend
65 # on the list of known ports should override this with a MockPortFactory . 65 # on the list of known ports should override this with a MockPortFactory .
66 self.port_factory = PortFactory(self) 66 self.port_factory = PortFactory(self)
67 67
68 self.builders = BuilderList(BUILDERS) 68 self.builders = BuilderList(BUILDERS)
69 69
70 def git(self, path=None): 70 def git(self, path=None):
71 if path: 71 if path:
72 return MockGit(cwd=path, filesystem=self.filesystem, executive=self. executive) 72 return MockGit(cwd=path, filesystem=self.filesystem, executive=self. executive, platform=self.platform)
73 if not self._git: 73 if not self._git:
74 self._git = MockGit(filesystem=self.filesystem, executive=self.execu tive) 74 self._git = MockGit(filesystem=self.filesystem, executive=self.execu tive, platform=self.platform)
75 # Various pieces of code (wrongly) call filesystem.chdir(checkout_root). 75 # Various pieces of code (wrongly) call filesystem.chdir(checkout_root).
76 # Making the checkout_root exist in the mock filesystem makes that chdir not raise. 76 # Making the checkout_root exist in the mock filesystem makes that chdir not raise.
77 self.filesystem.maybe_make_directory(self._git.checkout_root) 77 self.filesystem.maybe_make_directory(self._git.checkout_root)
78 return self._git 78 return self._git
79 79
80 def _add_base_manifest_to_mock_filesystem(self, filesystem): 80 def _add_base_manifest_to_mock_filesystem(self, filesystem):
81 webkit_finder = WebKitFinder(filesystem) 81 webkit_finder = WebKitFinder(filesystem)
82 82
83 external_dir = webkit_finder.path_from_webkit_base('LayoutTests', 'exter nal') 83 external_dir = webkit_finder.path_from_webkit_base('LayoutTests', 'exter nal')
84 filesystem.maybe_make_directory(filesystem.join(external_dir, 'wpt')) 84 filesystem.maybe_make_directory(filesystem.join(external_dir, 'wpt'))
85 85
86 manifest_base_path = filesystem.join(external_dir, 'WPT_BASE_MANIFEST.js on') 86 manifest_base_path = filesystem.join(external_dir, 'WPT_BASE_MANIFEST.js on')
87 filesystem.files[manifest_base_path] = '{}' 87 filesystem.files[manifest_base_path] = '{}'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698