From 3025bbb775240b3a7a66c28587bcc23973cdae79 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Mon, 20 Dec 2021 13:03:15 +0100 Subject: [PATCH] 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 --- tools/test-case-generators/format-request-map.json | 1 + tools/test-case-generators/generate-test-cases | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/test-case-generators/format-request-map.json b/tools/test-case-generators/format-request-map.json index eb61e5929..577e805ea 100644 --- a/tools/test-case-generators/format-request-map.json +++ b/tools/test-case-generators/format-request-map.json @@ -221,6 +221,7 @@ "filename": "installer.iso", "blueprint": {} }, + "no-image-info": true, "overrides": {} }, "qcow2": { diff --git a/tools/test-case-generators/generate-test-cases b/tools/test-case-generators/generate-test-cases index 1c63f1fda..462e91305 100755 --- a/tools/test-case-generators/generate-test-cases +++ b/tools/test-case-generators/generate-test-cases @@ -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