Skip to content

Commit fa29e70

Browse files
A Googlercopybara-github
authored andcommitted
Allow manual specification of the friendly name of the primary device.
PiperOrigin-RevId: 630105848 Change-Id: Ifb2da9e5d46e257ce5dc33efa8d0882dbdec685c
1 parent d1aebbc commit fa29e70

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

launcher/launcher.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ environment variables).
5151

5252
def _utp_build_message(ctx):
5353
"""Builds a RunnerConfig message (from runner_config.proto)."""
54-
primary_device_id = struct(id = environment_variable("DEVICE_UUID"), friendly_name = "primary")
54+
primary_device_id = struct(
55+
id = environment_variable("DEVICE_UUID"),
56+
friendly_name = ctx.attr.device_friendly_name,
57+
)
5558
primary_test_fixture_id = struct(id = environment_variable("TEST_FIXTURE_UUID"))
5659
installables = []
5760
if ctx.attr.test_app:
@@ -413,6 +416,10 @@ utp_test = rule(
413416
providers = [[utp_provider.UTPExtensionInfo]],
414417
mandatory = True,
415418
),
419+
device_friendly_name = attr.string(
420+
default = "primary",
421+
doc = "Friendly name to use for the primary device in logging",
422+
),
416423
entry_point = attr.label(
417424
providers = [[UTPEntryPointInfo]],
418425
mandatory = True,

0 commit comments

Comments
 (0)