wychen | 6cdbe50 | 2017-06-12 22:52:46 | [diff] [blame] | 1 | # Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | """Presubmit script for //build. |
| 6 | |
| 7 | See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 | for more details about the presubmit API built into depot_tools. |
| 9 | """ |
| 10 | |
| 11 | def PostUploadHook(cl, change, output_api): |
| 12 | """git cl upload will call this hook after the issue is created/modified. |
| 13 | |
| 14 | This hook modifies the CL description in order to run extra tests. |
| 15 | """ |
| 16 | |
| 17 | def affects_gn_checker(f): |
| 18 | return 'check_gn_headers' in f.LocalPath() |
| 19 | if not change.AffectedFiles(file_filter=affects_gn_checker): |
| 20 | return [] |
| 21 | return output_api.EnsureCQIncludeTrybotsAreAdded( |
| 22 | cl, |
| 23 | [ |
Andrii Shyshkalov | f3dd93a | 2018-05-04 21:12:43 | [diff] [blame] | 24 | 'luci.chromium.try:linux_chromium_dbg_ng', |
wychen | 6cdbe50 | 2017-06-12 22:52:46 | [diff] [blame] | 25 | ], |
| 26 | 'Automatically added tests to run on CQ.') |