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

Unified Diff: PRESUBMIT.py

Issue 2415193002: Add infra_tests.py, recipe, buildbotless bot (Closed)
Patch Set: Fixes Created 4 years, 2 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
« no previous file with comments | « no previous file | infra/bots/assets/asset_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index f0b5f42d6954cf9c13872724d91eda2cb96a4747..a6d1d164900a8d0b64dfc1318d842d8263fa00c2 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -167,32 +167,14 @@ def _ToolFlags(input_api, output_api):
return results
-def _RecipeSimulationTest(input_api, output_api):
- """Run the recipe simulation test."""
+def _InfraTests(input_api, output_api):
+ """Run the infra tests."""
results = []
if not any(f.LocalPath().startswith('infra')
for f in input_api.AffectedFiles()):
return results
- recipes_py = os.path.join('infra', 'bots', 'recipes.py')
- cmd = ['python', recipes_py, 'simulation_test']
- try:
- subprocess.check_output(cmd)
- except subprocess.CalledProcessError as e:
- results.append(output_api.PresubmitError(
- '`%s` failed:\n%s' % (' '.join(cmd), e.output)))
- return results
-
-
-def _GenTasksTest(input_api, output_api):
- """Run gen_tasks.go test."""
- results = []
- if not any(f.LocalPath().startswith('infra')
- for f in input_api.AffectedFiles()):
- return results
-
- gen_tasks = os.path.join('infra', 'bots', 'gen_tasks.go')
- cmd = ['go', 'run', gen_tasks, '--test']
+ cmd = ['python', os.path.join('infra', 'bots', 'infra_tests.py')]
try:
subprocess.check_output(cmd)
except subprocess.CalledProcessError as e:
@@ -254,8 +236,7 @@ def CheckChangeOnUpload(input_api, output_api):
results.extend(_CommonChecks(input_api, output_api))
# Run on upload, not commit, since the presubmit bot apparently doesn't have
# coverage or Go installed.
- results.extend(_RecipeSimulationTest(input_api, output_api))
- results.extend(_GenTasksTest(input_api, output_api))
+ results.extend(_InfraTests(input_api, output_api))
results.extend(_CheckGNFormatted(input_api, output_api))
return results
« no previous file with comments | « no previous file | infra/bots/assets/asset_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698