Fixes for presubmit recipe
- Add depot_tools to PATH - Run on a branch - Use max verbosity BUG=skia:5823 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394853002 Review-Url: https://codereview.chromium.org/2394853002
This commit is contained in:
parent
d567a815b0
commit
3493e17332
@ -122,13 +122,65 @@
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"cl",
|
||||
"presubmit",
|
||||
"--force"
|
||||
"checkout",
|
||||
"-b",
|
||||
"tmp_00000000-0000-0000-0000-000000000000"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"name": "create git branch"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"status"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"name": "git status"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"cl",
|
||||
"presubmit",
|
||||
"--force",
|
||||
"-v",
|
||||
"-v"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"PATH": "RECIPE_PACKAGE_REPO[depot_tools]:%(PATH)s"
|
||||
},
|
||||
"name": "presubmit"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"reset",
|
||||
"--hard",
|
||||
"origin/master"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"name": "git reset"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"checkout",
|
||||
"origin/master"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"name": "checkout origin/master"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"git",
|
||||
"branch",
|
||||
"-D",
|
||||
"tmp_00000000-0000-0000-0000-000000000000"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"name": "delete git branch"
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"recipe_result": null,
|
||||
|
@ -8,8 +8,11 @@
|
||||
|
||||
DEPS = [
|
||||
'core',
|
||||
'depot_tools/depot_tools',
|
||||
'recipe_engine/path',
|
||||
'recipe_engine/properties',
|
||||
'recipe_engine/step',
|
||||
'recipe_engine/uuid',
|
||||
'vars',
|
||||
]
|
||||
|
||||
@ -17,9 +20,34 @@ DEPS = [
|
||||
def RunSteps(api):
|
||||
api.vars.setup()
|
||||
api.core.checkout_steps()
|
||||
api.step('presubmit',
|
||||
cmd=['git', 'cl', 'presubmit', '--force'],
|
||||
|
||||
# git-cl wants us to be on a branch.
|
||||
branch = 'tmp_%s' % api.uuid.random()
|
||||
api.step('create git branch',
|
||||
cmd=['git', 'checkout', '-b', branch],
|
||||
cwd=api.vars.skia_dir)
|
||||
try:
|
||||
api.step('git status',
|
||||
cmd=['git', 'status'],
|
||||
cwd=api.vars.skia_dir)
|
||||
|
||||
depot_tools_path = api.depot_tools.package_repo_resource()
|
||||
env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])}
|
||||
api.step('presubmit',
|
||||
cmd=['git', 'cl', 'presubmit', '--force', '-v', '-v'],
|
||||
cwd=api.vars.skia_dir,
|
||||
env=env)
|
||||
finally:
|
||||
api.step('git reset',
|
||||
cmd=['git', 'reset', '--hard', 'origin/master'],
|
||||
cwd=api.vars.skia_dir)
|
||||
api.step('checkout origin/master',
|
||||
cmd=['git', 'checkout', 'origin/master'],
|
||||
cwd=api.vars.skia_dir)
|
||||
api.step('delete git branch',
|
||||
cmd=['git', 'branch', '-D', branch],
|
||||
cwd=api.vars.skia_dir)
|
||||
|
||||
|
||||
|
||||
def GenTests(api):
|
||||
|
@ -15,9 +15,7 @@ DEPS = [
|
||||
'build/gsutil',
|
||||
'builder_name_schema',
|
||||
'core',
|
||||
'depot_tools/depot_tools',
|
||||
'depot_tools/git',
|
||||
'depot_tools/tryserver',
|
||||
'recipe_engine/json',
|
||||
'recipe_engine/path',
|
||||
'recipe_engine/properties',
|
||||
|
Loading…
Reference in New Issue
Block a user