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

Unified Diff: PRESUBMIT.py

Issue 413983003: Refactor infra git libs and testing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Address comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index bbe498175f3bc0ffcf2cc5baaa6b6797dacc964a..08ccce1db2a621f52ce8ae9e6e416fb795f193ea 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -8,7 +8,6 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API built into gcl.
"""
-
DISABLED_TESTS = [
'.*appengine/chromium_status/tests/main_test.py',
'.*appengine/chromium_build/app_test.py',
@@ -23,6 +22,11 @@ DISABLED_PROJECTS = [
def CommonChecks(input_api, output_api):
+ # Cause all pylint commands to execute in the virtualenv
+ input_api.python_executable = (
+ input_api.os_path.join(input_api.PresubmitLocalPath(),
+ 'ENV', 'bin', 'python'))
+
tests = []
blacklist = list(input_api.DEFAULT_BLACK_LIST) + DISABLED_PROJECTS
@@ -49,12 +53,17 @@ def CommonChecks(input_api, output_api):
output_api,
black_list=blacklist,
disabled_warnings=disabled_warnings,
- extra_paths_list=[appengine_path]))
-
- whitelist = [r'.+_test\.py$']
- blacklist = blacklist + DISABLED_TESTS
- tests.extend(input_api.canned_checks.GetUnitTestsRecursively(
- input_api, output_api, '.', whitelist=whitelist, blacklist=blacklist))
+ extra_paths_list=[appengine_path,
+ '/infra/infra/ENV/lib/python2.7']))
+
+ message_type = (output_api.PresubmitError if output_api.is_committing else
+ output_api.PresubmitPromptWarning)
+ tests.append(input_api.Command(
+ name='All Tests',
+ cmd=input_api.os_path.join('ENV', 'bin', 'expect_tests'),
+ kwargs={'cwd': input_api.PresubmitLocalPath()},
+ message=message_type,
+ ))
# Run the tests.
return input_api.RunTests(tests)
« no previous file with comments | « .coveragerc ('k') | bootstrap/deps.pyl » ('j') | infra/libs/git2/test/test_util.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698