| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 DEPS = [ | 5 DEPS = [ |
| 6 'depot_tools/bot_update', | 6 'depot_tools/bot_update', |
| 7 'depot_tools/gclient', | 7 'depot_tools/gclient', |
| 8 'depot_tools/git', | 8 'depot_tools/git', |
| 9 'depot_tools/presubmit', |
| 9 'recipe_engine/json', | 10 'recipe_engine/json', |
| 10 'recipe_engine/path', | 11 'recipe_engine/path', |
| 11 'recipe_engine/properties', | 12 'recipe_engine/properties', |
| 12 'recipe_engine/python', | 13 'recipe_engine/python', |
| 13 'depot_tools/tryserver', | 14 'depot_tools/tryserver', |
| 14 ] | 15 ] |
| 15 | 16 |
| 16 | 17 |
| 17 def _run_presubmit(api, patch_root, bot_update_step): | 18 def _run_presubmit(api, patch_root, bot_update_step): |
| 18 upstream = bot_update_step.json.output['properties'].get( | 19 upstream = bot_update_step.json.output['properties'].get( |
| 19 api.gclient.c.got_revision_mapping[ | 20 api.gclient.c.got_revision_mapping[ |
| 20 'infra/go/src/github.com/luci/luci-go']) | 21 'infra/go/src/github.com/luci/luci-go']) |
| 21 # The presubmit must be run with proper Go environment. | 22 # The presubmit must be run with proper Go environment. |
| 22 # infra/go/env.py takes care of this. | 23 # infra/go/env.py takes care of this. |
| 23 presubmit_cmd = [ | 24 presubmit_cmd = [ |
| 24 'python', # env.py will replace with this its sys.executable. | 25 'python', # env.py will replace with this its sys.executable. |
| 25 api.path['depot_tools'].join('presubmit_support.py'), | 26 api.presubmit.presubmit_support_path, |
| 26 '--root', api.path['slave_build'].join(patch_root), | 27 '--root', api.path['slave_build'].join(patch_root), |
| 27 '--commit', | 28 '--commit', |
| 28 '--verbose', '--verbose', | 29 '--verbose', '--verbose', |
| 29 '--issue', api.properties['issue'], | 30 '--issue', api.properties['issue'], |
| 30 '--patchset', api.properties['patchset'], | 31 '--patchset', api.properties['patchset'], |
| 31 '--skip_canned', 'CheckRietveldTryJobExecution', | 32 '--skip_canned', 'CheckRietveldTryJobExecution', |
| 32 '--skip_canned', 'CheckTreeIsOpen', | 33 '--skip_canned', 'CheckTreeIsOpen', |
| 33 '--skip_canned', 'CheckBuildbotPendingBuilds', | 34 '--skip_canned', 'CheckBuildbotPendingBuilds', |
| 34 '--rietveld_url', api.properties['rietveld'], | 35 '--rietveld_url', api.properties['rietveld'], |
| 35 '--rietveld_fetch', | 36 '--rietveld_fetch', |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 api.python( | 83 api.python( |
| 83 'go test', | 84 'go test', |
| 84 api.path['checkout'].join('go', 'env.py'), | 85 api.path['checkout'].join('go', 'env.py'), |
| 85 ['go', 'test', 'github.com/luci/luci-go/...']) | 86 ['go', 'test', 'github.com/luci/luci-go/...']) |
| 86 | 87 |
| 87 | 88 |
| 88 def GenTests(api): | 89 def GenTests(api): |
| 89 yield ( | 90 yield ( |
| 90 api.test('luci_go') + | 91 api.test('luci_go') + |
| 91 api.properties.git_scheduled( | 92 api.properties.git_scheduled( |
| 93 path_config='kitchen', |
| 92 buildername='luci-go-linux64', | 94 buildername='luci-go-linux64', |
| 93 buildnumber=123, | 95 buildnumber=123, |
| 94 mastername='chromium.infra', | 96 mastername='chromium.infra', |
| 95 repository='https://chromium.googlesource.com/external/github.com/luci/l
uci-go', | 97 repository='https://chromium.googlesource.com/external/github.com/luci/l
uci-go', |
| 96 ) | 98 ) |
| 97 ) | 99 ) |
| 98 yield ( | 100 yield ( |
| 99 api.test('presubmit_try_job') + | 101 api.test('presubmit_try_job') + |
| 100 api.properties.tryserver( | 102 api.properties.tryserver( |
| 103 path_config='kitchen', |
| 101 mastername='tryserver.infra', | 104 mastername='tryserver.infra', |
| 102 buildername='Luci-go Presubmit', | 105 buildername='Luci-go Presubmit', |
| 103 ) + api.step_data('presubmit', api.json.output([[]])) | 106 ) + api.step_data('presubmit', api.json.output([[]])) |
| 104 ) | 107 ) |
| OLD | NEW |