Skip to content

Commit

Permalink
imgtestlib: check booted state when filtering
Browse files Browse the repository at this point in the history
If an image supports boot tests (checked using a static list), check if
the image is marked as 'boot-success' in the build cache and if it's
not, queue it for rebuild and boot testing.
  • Loading branch information
achilleas-k committed Oct 16, 2023
1 parent 90c30f9 commit 9454fbb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"edge-container"
]

# image types that can be boot tested
CAN_BOOT_TEST = [
"ami"
]


# base and terraform bits copied from main .gitlab-ci.yml
# needed for status reporting and defining the runners
Expand Down Expand Up @@ -204,7 +209,13 @@ def filter_builds(manifests, skip_ostree_pull=True):
commit = dl_config["commit"]
url = f"https://github.com/osbuild/images/commit/{commit}"
print(f"🖼️ Manifest {manifest_fname} was successfully built in commit {commit}\n {url}")
continue
if image_type not in CAN_BOOT_TEST:
print(f" Boot testing for {image_type} is not yet supported")
continue
# boot testing supported: check if it's been tested, otherwise queue it for rebuild and boot
if dl_config.get("boot-success", False):
print(" This image was successfully boot tested")
continue
except json.JSONDecodeError as jd:
errors.append((
f"failed to parse {build_info_path}\n"
Expand Down

0 comments on commit 9454fbb

Please sign in to comment.