depot_tools: add presubmit recipe module

BUG=584197

Review URL: https://codereview.chromium.org/1668803002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298588 0039d316-1c4b-4281-b951-d872f2087c98
parent 2f77e87a
DEPS = [
'recipe_engine/python',
]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_api
class PresubmitApi(recipe_api.RecipeApi):
def __call__(self, *args, **kwargs):
"""Return a presubmit step."""
name = kwargs.pop('name', 'presubmit')
return self.m.python(
name, self.package_resource('presubmit_support.py'), list(args),
**kwargs)
[
{
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE[depot_tools]/presubmit_support.py"
],
"cwd": "[SLAVE_BUILD]",
"name": "presubmit"
},
{
"name": "$result",
"recipe_result": null,
"status_code": 0
}
]
\ No newline at end of file
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'presubmit',
]
def RunSteps(api):
api.presubmit()
def GenTests(api):
yield api.test('basic')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment