# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Top-level presubmit script for catapult.

See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""


def GetPreferredTryMasters(project, change):
  return {
    'tryserver.client.catapult': {
      'Catapult Linux Tryserver': set(['defaulttests']),
      'Catapult Mac Tryserver': set(['defaulttests']),
      'Catapult Windows Tryserver': set(['defaulttests']),
    }
  }


def _CommonChecks(input_api, output_api):
  results = []
  results.extend(input_api.canned_checks.PanProjectChecks(
      input_api, output_api, project_name='catapult'))
  return results


def CheckChangeOnUpload(input_api, output_api):
  results = []
  results.extend(_CommonChecks(input_api, output_api))
  return results


def CheckChangeOnCommit(input_api, output_api):
  results = []
  results.extend(_CommonChecks(input_api, output_api))
  return results

# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Top-level presubmit script for catapult.

See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""


def GetPreferredTryMasters(project, change):
  return {
    'tryserver.client.catapult': {
      'Catapult Linux Tryserver': set(['defaulttests']),
      'Catapult Mac Tryserver': set(['defaulttests']),
      'Catapult Windows Tryserver': set(['defaulttests']),
    }
  }


def _CommonChecks(input_api, output_api):
  results = []
  results.extend(input_api.canned_checks.PanProjectChecks(
      input_api, output_api))
  return results


def CheckChangeOnUpload(input_api, output_api):
  results = []
  results.extend(_CommonChecks(input_api, output_api))
  return results


def CheckChangeOnCommit(input_api, output_api):
  results = []
  results.extend(_CommonChecks(input_api, output_api))
  return results

Remove custom project name, since it changes copyright statements.
Remove custom project name, since it changes copyright statements.

R=qyearsley@chromium.org

Review URL: https://codereview.chromium.org/1212843006.
