Hash :
fe4053ba
Author :
Date :
2021-04-13T13:08:40
infra: Add angle_mb_config.pyl. This will be used to set up gn args for standalone builds. We can then set the GN args source-side instead of in the recipe directly. Bug: angleproject:5114 Change-Id: I6fac6d13903951031a7299aea203f6b3e13c72bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2819461 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
# Copyright 2021 The ANGLE 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.
"""
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into depot_tools.
"""
import os
def _CommonChecks(input_api, output_api):
d = os.path.dirname
angle_root = d(d(input_api.PresubmitLocalPath()))
gen_script = os.path.join(angle_root, 'testing', 'buildbot', 'generate_buildbot_json.py')
# Validate the format of the mb_config.pyl file.
mb_path = os.path.join(angle_root, 'tools', 'mb', 'mb.py')
config_path = os.path.join(input_api.PresubmitLocalPath(), 'angle_mb_config.pyl')
commands = [
input_api.Command(
name='generate_buildbot_json',
cmd=[
input_api.python_executable, gen_script, '--check', '--verbose', '--pyl-files-dir',
input_api.PresubmitLocalPath()
],
kwargs={},
message=output_api.PresubmitError),
input_api.Command(
name='mb_validate',
cmd=[
input_api.python_executable,
mb_path,
'validate',
'-f',
config_path,
],
kwargs={'cwd': input_api.PresubmitLocalPath()},
message=output_api.PresubmitError),
]
messages = []
messages.extend(input_api.RunTests(commands))
return messages
def CheckChangeOnUpload(input_api, output_api):
return _CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return _CommonChecks(input_api, output_api)