Skip to content

Commit

Permalink
fix: Use list comprehension for Roma BYOB test images
Browse files Browse the repository at this point in the history
Bug: b/365562310
Change-Id: I288f10c21fa8f6d724f00c09127ef67e779066ad
GitOrigin-RevId: 086f0f1c09c11add086ecb6c7fed92a385bfeca2
  • Loading branch information
Privacy Sandbox Team authored and copybara-github committed Sep 16, 2024
1 parent 01f0cfd commit c0b645b
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions src/roma/byob/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,16 @@ pkg_files(

[
byob_image(
name = "sample_test_{}_image".format(user.flavor),
cmd = ["/server/bin/roma_byob_test"],
name = "{test_name}_test_{flavor}_image".format(
flavor = user.flavor,
test_name = test_name,
),
cmd = [cmd],
debug = False,
repo_tags = [
"roma_byob_sample_test_image:v1-{flavor}".format(
"roma_byob_{test_name}_test_image:v1-{flavor}".format(
flavor = user.flavor,
test_name = test_name,
),
],
tars = [
Expand All @@ -114,25 +118,10 @@ pkg_files(
use_nonroot = True if user.flavor == "nonroot" else False,
)
for user in DISTROLESS_USERS
]

[
byob_image(
name = "example_test_{}_image".format(user.flavor),
cmd = ["/server/bin/example_test"],
debug = False,
repo_tags = [
"roma_byob_example_test_image:v1-{flavor}".format(
flavor = user.flavor,
),
],
tars = [
":test_tar_{}".format(user.flavor),
],
udf_binary_labels = ["//src/roma/byob/udf:udf_binaries"],
use_nonroot = True if user.flavor == "nonroot" else False,
for test_name, cmd in (
("sample", "/server/bin/roma_byob_test"),
("example", "/server/bin/example_test"),
)
for user in DISTROLESS_USERS
]

genrule(
Expand Down

0 comments on commit c0b645b

Please sign in to comment.