1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-16 12:55:09 +03:00

fix tests

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
Casey Connolly 2025-05-26 18:42:22 +02:00
parent 88afc10e95
commit e44ef84b4b
9 changed files with 27 additions and 17 deletions

View file

@ -175,6 +175,12 @@ def random_valid_deviceinfo(tmp_path):
info["codename"] = tmp_path.name[7:]
info["chassis"] = random.choice(deviceinfo_chassis_types)
info["arch"] = random.choice(["armhf", "aarch64", "x86_64"])
# FIXME: we can't keep adding properties here manually as we make more of them
# discrete types..
if "rootfs_image_sector_size" in info:
info["rootfs_image_sector_size"] = random.choice([512, 2048, 4096])
if "boot_part_start" in info:
info["boot_part_start"] = random.choice([0, 2048, 4096])
# Now write it all out to a file
with open(path, "w") as f: