aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar borenet <borenet@chromium.org>2016-10-14 06:32:09 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-14 06:32:09 -0700
commit2dbbfa5d376d7356df5e18bd41d7138aa6345512 (patch)
tree8792a2146578f238d48469117744edce80f3ca19 /PRESUBMIT.py
parent2eaef920ebb241d718e0c1facb966eefb1f2aefb (diff)
Add infra_tests.py, recipe, buildbotless bot
Have the presubmit (upload) run infra_tests.py if anything in infra/ changed. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2415193002 Review-Url: https://codereview.chromium.org/2415193002
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