blob: b88632679a8a3c6d8f7ce3dc616d045f2d3a660b [file] [log] [blame]
wychen6cdbe502017-06-12 22:52:461# 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
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details about the presubmit API built into depot_tools.
9"""
10
11def 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 Shyshkalovf3dd93a2018-05-04 21:12:4324 'luci.chromium.try:linux_chromium_dbg_ng',
wychen6cdbe502017-06-12 22:52:4625 ],
26 'Automatically added tests to run on CQ.')