diff --git a/infra/gn_isolate_map.pyl b/infra/gn_isolate_map.pyl new file mode 100644 index 000000000..14ec38138 --- /dev/null +++ b/infra/gn_isolate_map.pyl @@ -0,0 +1,105 @@ +## Copyright 2020 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. + +# This is a .pyl, or "Python Literal", file. You can treat it just like a +# .json file, with the following exceptions: +# * all keys must be quoted (use single quotes, please); +# * comments are allowed, using '#' syntax; and +# * trailing commas are allowed. + +# gn_isolate_map.pyl - A mapping of Ninja build target names to GN labels and +# test type classifications for the tests that are run on the bots. +# +# This mapping is used by MB so that we can uniformly refer to test binaries +# by their Ninja target names in the recipes and not need to worry about how +# they are referred to in GN or GYP specifically (the GYP target name is pretty +# much always the same as the Ninja target name, since GYP target names are not +# hierarchical). + +# TODO(crbug.com/816629): Remove the need for this file altogether :). Also, +# see the canonical Chromium copy: +# https://chromium.googlesource.com/chromium/src/+/refs/heads/master/testing/buildbot/gn_isolate_map.pyl + +{ + "angle_apks": { + "label": "//:angle_apks", + "type": "additional_compile_target", + }, + "angle_deqp_egl_tests": { + "args": [], + "label": "//src/tests:angle_deqp_egl_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_gles2_tests": { + "args": [], + "label": "//src/tests:angle_deqp_gles2_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_gles31_tests": { + "args": [], + "label": "//src/tests:angle_deqp_gles31_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_gles3_tests": { + "args": [], + "label": "//src/tests:angle_deqp_gles3_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_khr_gles2_tests": { + "args": [], + "label": "//src/tests:angle_deqp_khr_gles2_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_khr_gles3_tests": { + "args": [], + "label": "//src/tests:angle_deqp_khr_gles3_tests", + "type": "windowed_test_launcher", + }, + "angle_deqp_khr_gles31_tests": { + "args": [], + "label": "//src/tests:angle_deqp_khr_gles31_tests", + "type": "windowed_test_launcher", + }, + "angle_end2end_tests": { + "args": [], + "label": "//src/tests:angle_end2end_tests", + "type": "windowed_test_launcher", + }, + "angle_gles1_conformance_tests": { + "args": [], + "label": "//src/tests:angle_gles1_conformance_tests", + "type": "windowed_test_launcher", + }, + "angle_perftests": { + "args": [ + "angle_perftests", + "--non-telemetry=true", + "--test-launcher-print-test-stdio=always", + "--test-launcher-jobs=1", + "--test-launcher-retry-limit=0", + ], + "label": "//src/tests:angle_perftests", + "script": "//testing/scripts/run_performance_tests.py", + "type": "script", + }, + "angle_restricted_trace_gold_tests": { + "type": "script", + "label": "//src/tests/restricted_traces:angle_restricted_trace_gold_tests", + "script": "//src/tests/restricted_traces/restricted_trace_gold_tests.py", + }, + "angle_unittests": { + "label": "//src/tests:angle_unittests", + "type": "console_test_launcher", + }, + "angle_white_box_perftests": { + "args": [], + "label": "//src/tests:angle_white_box_tests", + "type": "windowed_test_launcher", + }, + "angle_white_box_tests": { + "args": [], + "label": "//src/tests:angle_white_box_tests", + "type": "windowed_test_launcher", + }, +} diff --git a/scripts/trigger.py b/scripts/trigger.py index e8b0e5461..587ecda9b 100755 --- a/scripts/trigger.py +++ b/scripts/trigger.py @@ -9,6 +9,7 @@ import argparse import hashlib +import logging import os import subprocess import sys @@ -34,8 +35,18 @@ def main(): out_gn_path = '//' + path out_file_path = os.path.join(*path.split('/')) + # Attempt to detect standalone vs chromium component build. + is_standalone = not os.path.isdir(os.path.join('third_party', 'angle')) + mb_script_path = os.path.join('tools', 'mb', 'mb.py') - subprocess.call(['python', mb_script_path, 'isolate', out_gn_path, args.test]) + mb_args = ['python', mb_script_path, 'isolate', out_gn_path, args.test] + + if is_standalone: + logging.info('Standalone mode detected.') + mb_args += ['-i', os.path.join('infra', 'gn_isolate_map.pyl')] + + if subprocess.call(mb_args): + sys.exit('MB step failed, exiting') isolate_cmd_path = os.path.join('tools', 'luci-go', 'isolate') isolate_file = os.path.join(out_file_path, '%s.isolate' % args.test) @@ -49,7 +60,7 @@ def main(): with open(isolated_file, 'rb') as f: sha = hashlib.sha1(f.read()).hexdigest() - print('Got an isolated SHA of %s' % sha) + logging.info('Got an isolated SHA of %s' % sha) swarming_script_path = os.path.join('tools', 'luci-go', 'swarming') swarming_args = [ @@ -78,7 +89,7 @@ def main(): if unknown: shard_args += ["--"] + unknown - print(' '.join(shard_args)) + logging.info(' '.join(shard_args)) subprocess.call(shard_args) return 0