Commit 04600b4f authored by Yoshisato Yanagisawa's avatar Yoshisato Yanagisawa Committed by Commit Bot

Expose gclient_paths via InputAPI.

The function we use with gclient_utils has moved to gclient_paths.
However, I am not sure gclient_utils is used by others or not.

Additional change:
- sorted testMembersChanged members for ease of understanding what is
  different.

Bug: 939959
Change-Id: I8b822e26afc73b39d2a33c5e07779c9c14cbd394
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1521850
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: 's avatarNico Weber <thakis@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: 's avatarFumitoshi Ukai <ukai@chromium.org>
parent 18412ab7
......@@ -44,7 +44,8 @@ from warnings import warn
# Local imports.
import fix_encoding
import gclient_utils # Exposed through the API
import gclient_paths # Exposed through the API
import gclient_utils
import git_footers
import gerrit_util
import owners
......@@ -516,7 +517,7 @@ class InputApi(object):
self.cpplint = cpplint
self.cStringIO = cStringIO
self.fnmatch = fnmatch
self.gclient_utils = gclient_utils
self.gclient_paths = gclient_paths
self.glob = glob.glob
self.json = json
self.logging = logging.getLogger('PRESUBMIT')
......
......@@ -173,23 +173,20 @@ class PresubmitUnittest(PresubmitTestsBase):
def testMembersChanged(self):
self.mox.ReplayAll()
members = [
'AffectedFile', 'Change', 'DoPostUploadExecuter', 'DoPresubmitChecks',
'GetPostUploadExecuter', 'GitAffectedFile', 'CommandData',
'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'main',
'OutputApi', 'ParseFiles',
'PresubmitFailure', 'PresubmitExecuter', 'PresubmitOutput', 'ScanSubDirs',
'SigintHandler', 'ThreadPool',
'ast', 'cPickle', 'cpplint', 'cStringIO', 'contextlib',
'canned_check_filter', 'fix_encoding', 'fnmatch', 'gclient_utils',
'git_footers', 'glob', 'inspect', 'json', 'load_files', 'logging',
'marshal', 'normpath', 'optparse', 'os', 'owners', 'owners_finder',
'pickle', 'presubmit_canned_checks', 'random', 're', 'scm',
'sigint_handler', 'signal',
'subprocess', 'sys', 'tempfile', 'threading',
'time', 'traceback', 'types', 'unittest',
'urllib2', 'warn', 'multiprocessing', 'DoGetTryMasters',
'GetTryMastersExecuter', 'itertools', 'urlparse', 'gerrit_util',
'GerritAccessor',
'AffectedFile', 'Change', 'CommandData', 'DoGetTryMasters',
'DoPostUploadExecuter', 'DoPresubmitChecks', 'GerritAccessor',
'GetPostUploadExecuter', 'GetTryMastersExecuter', 'GitAffectedFile',
'GitChange', 'InputApi', 'ListRelevantPresubmitFiles', 'OutputApi',
'ParseFiles', 'PresubmitExecuter', 'PresubmitFailure',
'PresubmitOutput', 'ScanSubDirs', 'SigintHandler', 'ThreadPool', 'ast',
'cPickle', 'cStringIO', 'canned_check_filter', 'contextlib', 'cpplint',
'fix_encoding', 'fnmatch', 'gclient_paths', 'gclient_utils',
'gerrit_util', 'git_footers', 'glob', 'inspect', 'itertools', 'json',
'load_files', 'logging', 'main', 'marshal', 'multiprocessing',
'normpath', 'optparse', 'os', 'owners', 'owners_finder', 'pickle',
'presubmit_canned_checks', 'random', 're', 'scm', 'sigint_handler',
'signal', 'subprocess', 'sys', 'tempfile', 'threading', 'time',
'traceback', 'types', 'unittest', 'urllib2', 'urlparse', 'warn'
]
# If this test fails, you should add the relevant test.
self.compareMembers(presubmit, members)
......@@ -957,7 +954,7 @@ class InputApiUnittest(PresubmitTestsBase):
'dry_run',
'environ',
'fnmatch',
'gclient_utils',
'gclient_paths',
'gerrit',
'glob',
'is_committing',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment