diff options
author | borenet <borenet@chromium.org> | 2016-07-26 11:52:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-26 11:52:17 -0700 |
commit | 1ed2ae45f59c2864ea05838b4da2750b85472824 (patch) | |
tree | 688a878b16ddb48ae678e8e754c18fe71c23bba0 /PRESUBMIT.py | |
parent | 7e922765545f42ce691e4f3d5fbbd4e44ba47ff1 (diff) |
Move Skia recipes from build repo
BUG=skia:5563
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175373002
Review-Url: https://codereview.chromium.org/2175373002
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 1412b2b95f..a3af9e4445 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 |