aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py27
1 files changed, 4 insertions, 23 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index f0b5f42d69..a6d1d16490 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