Tools: add 'no-image-info' option to image test case requests

Add a new option `no-image-info`, which can be specified for an image
type in `format-request-map.json` in case the image can not be analyzed
using `image-info` and thus it should not be run as part of generating
the image test case.

This is the case for e.g. the `image-installer` image type in RHEL-8.6,
which effectively breaks generating all image test cases for RHEL-8.6
due to `image-info` failing to analyze the resulting image.

This change will allow us to consistently generate image test cases
(manifests only) for all image types, which were so far not covered by
the image testing.

Modify the `generate-test-cases` script to recognize the `no-image-info`
option in the `format-request-map.json`

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-12-20 13:03:15 +01:00 committed by Ondřej Budai
parent 4a2041b38e
commit 3025bbb775
2 changed files with 7 additions and 1 deletions

View file

@ -221,6 +221,7 @@
"filename": "installer.iso",
"blueprint": {}
},
"no-image-info": true,
"overrides": {}
},
"qcow2": {

View file

@ -161,7 +161,12 @@ def main(distro, arch, image_types, keep_image_info, store, output):
if distro in test_case_request["overrides"]:
filtered_request["compose-request"].update(test_case_request["overrides"][distro])
generate_test_case("boot", distro, arch, output_format, filtered_request, keep_image_info, store, output)
# Some image types can not be analyzed by 'image-info'. To be able to
# regenerate all test cases for a distro, this must be request definition
# and not a cli option. Default to the 'keep_image_info' value if not
# set explicitly for the image type.
no_image_info = filtered_request.get("no-image-info", keep_image_info)
generate_test_case("boot", distro, arch, output_format, filtered_request, no_image_info, store, output)
return