• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 the V8 project 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 //v8/src
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
11import os
12
13
14def PostUploadHook(cl, change, output_api):
15  """git cl upload will call this hook after the issue is created/modified.
16
17  This hook adds extra try bots to the CL description in order to run layout
18  tests in addition to CQ try bots.
19  """
20  def is_api_cc(f):
21    return 'api.cc' == os.path.split(f.LocalPath())[1]
22  if not change.AffectedFiles(file_filter=is_api_cc):
23    return []
24  return output_api.EnsureCQIncludeTrybotsAreAdded(
25    cl,
26    [
27      'luci.chromium.try:linux_chromium_rel_ng'
28    ],
29    'Automatically added layout test trybots to run tests on CQ.')
30