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-d872f2087c98changes/01/332501/1
parent
2f77e87ac8
commit
b182750ed9
@ -0,0 +1,3 @@
|
||||
DEPS = [
|
||||
'recipe_engine/python',
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
# 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)
|
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"cmd": [
|
||||
"python",
|
||||
"-u",
|
||||
"RECIPE_PACKAGE[depot_tools]/presubmit_support.py"
|
||||
],
|
||||
"cwd": "[SLAVE_BUILD]",
|
||||
"name": "presubmit"
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
"status_code": 0
|
||||
}
|
||||
]
|
@ -0,0 +1,15 @@
|
||||
# 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')
|
Loading…
Reference in New Issue