aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-27 04:14:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-27 04:14:07 -0700
commit3da80f5ecd98c9b3f46c23b85854b8f96025e565 (patch)
treecc46733e43f16882841d29a3fb60c4911396a79b /PRESUBMIT.py
parenteb560284c5a44389cd3f3b304839ea34a3e73398 (diff)
Only run recipe simulation tests if infra/ changes.
This should lessen the need for mortals to have coverage.py, and saves 1.8s (of 3.6s) on my desktop for this non-infra change. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187713002 Review-Url: https://codereview.chromium.org/2187713002
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index a3af9e4445..e0e01fb30f 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -172,6 +172,10 @@ def _ToolFlags(input_api, output_api):
def _RecipeSimulationTest(input_api, output_api):
"""Run the recipe simulation test."""
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: