0

Add the ability to not generate location tag metadata at runhooks-time.

Some build configs may be run on machines where `dirmd` won't work
correctly, and so we add the ability to turn off that glcient hook
altogether.

It is still possible to generate the metadata but not include it
in the test isolate on a build-by-build basis via a GN arg as well.

Bug: 1218056
Change-Id: I9b115fe26bbff5ba2b459c427e9a84c5dc43c956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2957335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#892228}
This commit is contained in:
Dirk Pranke
2021-06-14 19:57:50 +00:00
committed by Chromium LUCI CQ
parent b9aea738ca
commit b404c3b355
2 changed files with 16 additions and 3 deletions

11
DEPS

@ -46,6 +46,7 @@ gclient_gn_args = [
'checkout_rts_model',
'cros_boards',
'cros_boards_with_qemu_images',
'generate_location_tags',
]
@ -174,6 +175,13 @@ vars = {
'checkout_simplechrome': '"{cros_boards}" != ""',
'checkout_simplechrome_with_vms': '"{cros_boards_with_qemu_images}" != ""',
# Generate location tag metadata to include in tests result data uploaded
# to ResultDB. This isn't needed on some configs and the tool that generates
# the data may not run on them, so we make it possible for this to be
# turned off. Note that you also generate the metadata but not include it
# via a GN build arg (tests_have_location_tags).
'generate_location_tags': True,
# luci-go CIPD package version.
# Make sure the revision is uploaded by infra-packagers builder.
# https://ci.chromium.org/p/infra-internal/g/infra-packagers/console
@ -4487,7 +4495,7 @@ hooks = [
},
{
'name': 'Generate component metadata for tests',
'name': 'Generate location tags for tests',
'pattern': '.',
'action': [
'python3',
@ -4495,6 +4503,7 @@ hooks = [
'--out',
'src/testing/location_tags.json',
],
'condition': 'generate_location_tags',
},
# Download and initialize "vpython" VirtualEnv environment packages.

@ -8,12 +8,16 @@
import("//build/config/chromeos/args.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/gclient_args.gni")
import("//build/config/rts.gni")
import("//build_overrides/build.gni")
declare_args() {
# Some component repos (e.g. ANGLE) import //testing but do not have "location_tags.json"
tests_have_location_tags = true
# Some component repos (e.g. ANGLE) import //testing but do not have
# "location_tags.json", and so we don't want to try and upload the tags
# for their tests.
# And, some build configs may simply turn off generation altogether.
tests_have_location_tags = generate_location_tags
}
if (is_android) {