Commit 8d195230 authored by maruel@chromium.org's avatar maruel@chromium.org

Add a note warning the users that presubmit hooks will be run.

Otherwise the scripts make it looks like they are hung when the presubmit checks
are slow.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@61506 0039d316-1c4b-4281-b951-d872f2087c98
parent 21dca0e7
......@@ -945,6 +945,7 @@ def DoPresubmitChecks(change,
Return:
True if execution can continue, False if not.
"""
print "Running presubmit hooks..."
start_time = time.time()
presubmit_files = ListRelevantPresubmitFiles(change.AbsoluteLocalPaths(True),
change.RepositoryRoot())
......
......@@ -341,6 +341,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.failIf(presubmit.DoPresubmitChecks(change, False, True, output, input,
None, False))
self.assertEqual(output.getvalue().count('!!'), 2)
self.checkstdout('Running presubmit hooks...\n')
def testDoPresubmitChecksPromptsAfterWarnings(self):
join = presubmit.os.path.join
......@@ -379,6 +380,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.failUnless(presubmit.DoPresubmitChecks(change, False, True, output,
input, None, True))
self.assertEquals(output.getvalue().count('??'), 2)
self.checkstdout('Running presubmit hooks...\nRunning presubmit hooks...\n')
def testDoPresubmitChecksNoWarningPromptIfErrors(self):
join = presubmit.os.path.join
......@@ -413,6 +415,7 @@ class PresubmitUnittest(PresubmitTestsBase):
self.assertEqual(output.getvalue().count('??'), 2)
self.assertEqual(output.getvalue().count('XX!!XX'), 2)
self.assertEqual(output.getvalue().count('(y/N)'), 0)
self.checkstdout('Running presubmit hooks...\n')
def testDoDefaultPresubmitChecksAndFeedback(self):
join = presubmit.os.path.join
......@@ -452,6 +455,7 @@ def CheckChangeOnCommit(input_api, output_api):
'Was the presubmit check useful? Please send feedback & hate mail '
'to maruel@chromium.org!\n')
self.assertEquals(output.getvalue(), text)
self.checkstdout('Running presubmit hooks...\n')
def testDirectoryHandling(self):
files = [
......@@ -523,6 +527,7 @@ def CheckChangeOnCommit(input_api, output_api):
'Running default presubmit script.\n'
'** Presubmit Messages **\n'
'http://tracker.com/42\n\n'))
self.checkstdout('Running presubmit hooks...\n')
def testGetTrySlavesExecuter(self):
self.mox.ReplayAll()
......
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