webrtc_m130/webrtc/build/PRESUBMIT.py
kjellander@webrtc.org 861dcb7edd MB: Add initial mb_config.pyl configuration file.
This is only needed and used by the iOS GN bots so far, but
more bots will start using this in the future as we'll be migrating
from GYP to GN at some point.

Buildbot configuration is done in
https://codereview.chromium.org/1730353002

BUG=589510
R=dpranke@chromium.org

Review URL: https://codereview.webrtc.org/1735593002 .

Cr-Commit-Position: refs/heads/master@{#11752}
2016-02-24 20:36:53 +00:00

35 lines
1.3 KiB
Python

# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
def _CommonChecks(input_api, output_api):
results = []
# Validate the format of the mb_config.pyl file.
mb_script = input_api.os_path.join(input_api.PresubmitLocalPath(), '..',
'..', 'tools', 'mb', 'mb.py')
mb_config_path = input_api.os_path.join(input_api.PresubmitLocalPath(),
'mb_config.pyl')
cmd = [input_api.python_executable, mb_script, 'validate', '--config-file',
mb_config_path]
kwargs = {'cwd': input_api.PresubmitLocalPath()}
results.extend(input_api.RunTests([
input_api.Command(name='mb_validate',
cmd=cmd, kwargs=kwargs,
message=output_api.PresubmitError)]))
return results
def CheckChangeOnUpload(input_api, output_api):
return _CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return _CommonChecks(input_api, output_api)