Skip to content

Commit

Permalink
test: mark successful booting in the build info
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-k committed Oct 5, 2023
1 parent ad52205 commit 187de7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/scripts/boot-image
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit 187de7e

Please sign in to comment.