Commit 5248d9df authored by maruel@chromium.org's avatar maruel@chromium.org

Revert both r51761 and r51760 as it broke the webkit slaves.

TBR=msb

Review URL: http://codereview.chromium.org/2886017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51767 0039d316-1c4b-4281-b951-d872f2087c98
parent 6e55ebea
This diff is collapsed.
......@@ -310,6 +310,14 @@ def SubprocessCallAndFilter(command,
raise Error(msg)
def IsUsingGit(root, paths):
"""Returns True if we're using git to manage any of our checkouts.
|entries| is a list of paths to check."""
for path in paths:
if os.path.exists(os.path.join(root, path, '.git')):
return True
return False
def FindGclientRoot(from_dir, filename='.gclient'):
"""Tries to find the gclient root."""
path = os.path.realpath(from_dir)
......
......@@ -558,6 +558,7 @@ class GClientSmokeGIT(GClientSmokeBase):
def testRevInfo(self):
if not self.enabled:
return
# TODO(maruel): Test multiple solutions.
self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
self.gclient(['sync', '--deps', 'mac'])
results = self.gclient(['revinfo', '--deps', 'mac'])
......@@ -592,7 +593,7 @@ class GClientSmokeBoth(GClientSmokeBase):
# 3x svn checkout, 3x run hooks
self.checkBlock(results[0],
['running', 'running', 'running', 'running', 'running',
'running'])
'running', 'running'])
# TODO(maruel): Something's wrong here. git outputs to stderr 'Switched to
# new branch \'hash\''.
#self.checkString('', results[1])
......@@ -607,6 +608,7 @@ class GClientSmokeBoth(GClientSmokeBase):
tree['src/git_hooked1'] = 'git_hooked1'
tree['src/git_hooked2'] = 'git_hooked2'
tree['src/svn_hooked1'] = 'svn_hooked1'
tree['src/svn_hooked2'] = 'svn_hooked2'
self.assertTree(tree)
def testMultiSolutionsMultiRev(self):
......@@ -673,7 +675,7 @@ class GClientSmokeBoth(GClientSmokeBase):
self.gclient(['sync', '--deps', 'mac'])
results = self.gclient(['recurse', 'sh', '-c',
'echo $GCLIENT_SCM,$GCLIENT_URL,`pwd`'])
entries = [tuple(line.split(','))
for line in results[0].strip().split('\n')]
logging.debug(entries)
......
......@@ -17,7 +17,7 @@ class GclientUtilsUnittest(SuperMoxTestBase):
members = [
'CheckCall', 'CheckCallError', 'Error', 'FileRead', 'FileWrite',
'FindFileUpwards', 'FindGclientRoot', 'GetGClientRootAndEntries',
'GetNamedNodeText', 'GetNodeNamedAttributeText',
'GetNamedNodeText', 'GetNodeNamedAttributeText', 'IsUsingGit',
'PathDifference', 'ParseXML', 'PrintableObject', 'RemoveDirectory',
'SplitUrlRevision', 'SubprocessCall', 'SubprocessCallAndFilter',
'SyntaxErrorToError',
......
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