From 69bd61bda493b6dc8e859fdd3eb76e12e87f380f Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 5 Oct 2023 22:31:06 +0200 Subject: [PATCH] test: mark successful booting in the build info --- test/scripts/boot-image | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/scripts/boot-image b/test/scripts/boot-image index 04850caea3..161f1d1fae 100755 --- a/test/scripts/boot-image +++ b/test/scripts/boot-image @@ -99,7 +99,19 @@ def main(): case "ami": boot_ami(distro, arch, image_type, config_path, image_path) case _: + # skip print(f"{image_type} boot tests are not supported yet") + return + + print("✅ Marking boot successful") + # amend build info with boot success + # search_path is the root of the build path (build/build_name) + info_file_path = os.path.join(search_path, "info.json") + with open(info_file_path) as info_fp: + build_info = json.load(info_fp) + build_info["boot-success"] = True + with open(info_file_path, "w") as info_fp: + json.dump(build_info, info_fp, indent=2) if __name__ == "__main__":