Skip to content

Commit a91829a

Browse files
vickiechengCQ Bot
authored and
CQ Bot
committedMar 10, 2025
[fxtest] Update is_boot_test check
Use the `is_boot_test` field instead of `product_bundle` to determine if a test is a boot test. Bug: 377751295 Change-Id: I8a6f4588a980fc7079caa5b6ad036e73833071ca Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1193942 Fuchsia-Auto-Submit: Vickie Cheng <[email protected]> Reviewed-by: Christopher Johnson <[email protected]> Reviewed-by: Clayton Wilkinson <[email protected]> Commit-Queue: Auto-Submit <[email protected]>
1 parent 1d46b3c commit a91829a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed
 

‎scripts/fxtest/python/test_list_file.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ def is_pure_device_test(self) -> bool:
221221
def is_boot_test(self) -> bool:
222222
"""Determine if this test is a boot test.
223223
224-
Boot tests specify a product_bundle entry and reboot the device.
224+
Boot tests specify is_boot_test and reboot the device.
225225
226226
Returns:
227227
bool: True only if this test is a boot test.
228228
"""
229-
return self.build.product_bundle is not None
229+
return self.build.is_boot_test is not None and self.build.is_boot_test
230230

231231
def package_name(self) -> str | None:
232232
"""Get the package name for this test if applicable.

‎scripts/fxtest/python/tests/execution_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ async def test_test_execution_skip_boot_tests(
598598
)
599599
)
600600
],
601-
product_bundle="some_product",
601+
is_boot_test=True,
602602
),
603603
test_list_file.TestListEntry("foo", [], execution=None),
604604
),

‎scripts/fxtest/python/tests_json_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class TestEntry:
9494
environments: list[EnvironmentEntry] | None = None
9595

9696
# Optional field that is set for boot tests only.
97-
product_bundle: str | None = None
97+
is_boot_test: bool | None = None
9898

9999
@classmethod
100100
def from_file(

‎tools/devshell/contrib/run-boot-test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __lt__(self, other):
141141

142142
@staticmethod
143143
def is_boot_test(test_json):
144-
return "product_bundle" in test_json
144+
return bool(test_json.get("is_boot_test"))
145145

146146
def is_uefi_boot(self):
147147
if self.efi_disk:

0 commit comments

Comments
 (0)