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

Unified Diff: PRESUBMIT.py

Issue 2175373002: Move Skia recipes from build repo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address more comments Created 4 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
« no previous file with comments | « .gitignore ('k') | infra/bots/compile_skia.isolate » ('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 1412b2b95f09222efe8a8e27c93618ecc4ac8377..a3af9e4445b46bc28c05c97698b93d8b28929d42 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -169,6 +169,19 @@ def _ToolFlags(input_api, output_api):
return results
+def _RecipeSimulationTest(input_api, output_api):
+ """Run the recipe simulation test."""
+ 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 _CommonChecks(input_api, output_api):
"""Presubmit checks common to upload and commit."""
results = []
@@ -202,6 +215,9 @@ def CheckChangeOnUpload(input_api, output_api):
"""
results = []
results.extend(_CommonChecks(input_api, output_api))
+ # Run on upload, not commit, since the presubmit bot apparently doesn't have
+ # coverage installed.
+ results.extend(_RecipeSimulationTest(input_api, output_api))
return results
« no previous file with comments | « .gitignore ('k') | infra/bots/compile_skia.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698