Commit d52417c9 authored by maruel@chromium.org's avatar maruel@chromium.org

Do not run integration tests on upload, they are too slow.

gclient_scm_test.py throws randomly gclient_utils.Error.
Simply update the test expectation. It has no effect on runtime.

BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99436 0039d316-1c4b-4281-b951-d872f2087c98
parent 118fb1cd
...@@ -9,7 +9,7 @@ details on the presubmit API built into depot_tools. ...@@ -9,7 +9,7 @@ details on the presubmit API built into depot_tools.
""" """
def CommonChecks(input_api, output_api): def CommonChecks(input_api, output_api, tests_to_black_list):
results = [] results = []
import sys import sys
if not sys.version.startswith('2.5'): if not sys.version.startswith('2.5'):
...@@ -41,8 +41,8 @@ def CommonChecks(input_api, output_api): ...@@ -41,8 +41,8 @@ def CommonChecks(input_api, output_api):
input_api, input_api,
output_api, output_api,
'tests', 'tests',
whitelist=[r'.*test\.py$'])) whitelist=[r'.*tests\.py$'],
results.extend(RunGitClTests(input_api, output_api)) blacklist=tests_to_black_list))
return results return results
...@@ -95,13 +95,20 @@ def RunGitClTests(input_api, output_api): ...@@ -95,13 +95,20 @@ def RunGitClTests(input_api, output_api):
def CheckChangeOnUpload(input_api, output_api): def CheckChangeOnUpload(input_api, output_api):
return CommonChecks(input_api, output_api) # Do not run integration tests on upload since they are way too slow.
tests_to_black_list = [
r'^checkout_test\.py$',
r'^gclient_smoketest\.py$',
r'^scm_unittest\.py$',
]
return CommonChecks(input_api, output_api, tests_to_black_list)
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
output = [] output = []
output.extend(CommonChecks(input_api, output_api)) output.extend(CommonChecks(input_api, output_api, []))
output.extend(input_api.canned_checks.CheckDoNotSubmit( output.extend(input_api.canned_checks.CheckDoNotSubmit(
input_api, input_api,
output_api)) output_api))
output.extend(RunGitClTests(input_api, output_api))
return output return output
...@@ -757,7 +757,7 @@ from :3 ...@@ -757,7 +757,7 @@ from :3
try: try:
scm.update(options, (), []) scm.update(options, (), [])
self.fail() self.fail()
except gclient_scm.gclient_utils.CheckCallError: except gclient_scm.gclient_utils.Error:
# The exact exception text varies across git versions so it's not worth # The exact exception text varies across git versions so it's not worth
# verifying it. It's fine as long as it throws. # verifying it. It's fine as long as it throws.
pass pass
......
...@@ -16,7 +16,8 @@ setup_gitsvn ...@@ -16,7 +16,8 @@ setup_gitsvn
git config rietveld.server localhost:8080 git config rietveld.server localhost:8080
for ref in refs/remotes/trunk refs/remotes/some_branch; do for ref in refs/remotes/trunk refs/remotes/some_branch; do
git checkout -q -B feature_branch $ref git branch -f --set-upstream feature_branch $ref
git checkout -q feature_branch
test_expect_success "Guessing upstream branch for $ref" \ test_expect_success "Guessing upstream branch for $ref" \
"$GIT_CL upstream | egrep -q '^$ref$'" "$GIT_CL upstream | egrep -q '^$ref$'"
git checkout -q master git checkout -q master
......
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