Skip to content

Commit

Permalink
Fix manifest parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoscieln committed Feb 27, 2024
1 parent 04c7423 commit ecb8769
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 3 deletions.
179 changes: 179 additions & 0 deletions db-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,182 @@ rhel_92-aarch64-minimal_raw-boot
rhel_92-x86_64-edge_ami-boot
rhel_92-x86_64-minimal_raw-boot
rhel_92-x86_64-ova-boot
rhel_9.3-x86_64-edge_ami-edge_ostree_pull_user
rhel_9.3-x86_64-edge_ami-edge_ostree_pull_user_fips
rhel_9.3-x86_64-edge_ami-ostree_filesystem_customizations
rhel_9.3-x86_64-edge_commit-embed_containers
rhel_9.3-x86_64-edge_commit-ostree
rhel_9.3-x86_64-edge_container-embed_containers_2
rhel_9.3-x86_64-edge_container-empty
rhel_9.3-x86_64-edge_container-ostree
rhel_9.3-x86_64-edge_installer-edge_ostree_pull_empty
rhel_9.3-x86_64-edge_installer-edge_ostree_pull_fips
rhel_9.3-x86_64-edge_installer-unattended_iso_edge
rhel_9.3-x86_64-edge_raw_image-edge_ostree_pull_empty
rhel_9.3-x86_64-edge_raw_image-edge_ostree_pull_fips
rhel_9.3-x86_64-edge_raw_image-ostree_filesystem_customizations
rhel_9.3-x86_64-edge_simplified_installer-edge_ostree_pull_device
rhel_9.3-x86_64-edge_simplified_installer-edge_ostree_pull_device_fips
rhel_9.3-x86_64-edge_vsphere-edge_ostree_pull_empty
rhel_9.3-x86_64-edge_vsphere-edge_ostree_pull_fips
rhel_9.3-x86_64-edge_vsphere-ostree_filesystem_customizations
rhel_9.3-aarch64-edge_ami-edge_ostree_pull_user
rhel_9.3-aarch64-edge_ami-edge_ostree_pull_user_fips
rhel_9.3-aarch64-edge_ami-ostree_filesystem_customizations
rhel_9.3-aarch64-edge_commit-embed_containers
rhel_9.3-aarch64-edge_commit-ostree
rhel_9.3-aarch64-edge_container-embed_containers_2
rhel_9.3-aarch64-edge_container-ostree
rhel_9.3-aarch64-edge_installer-edge_ostree_pull_empty
rhel_9.3-aarch64-edge_installer-edge_ostree_pull_fips
rhel_9.3-aarch64-edge_installer-unattended_iso_edge
rhel_9.3-aarch64-edge_raw_image-edge_ostree_pull_empty
rhel_9.3-aarch64-edge_raw_image-edge_ostree_pull_fips
rhel_9.3-aarch64-edge_raw_image-ostree_filesystem_customizations
rhel_9.3-aarch64-edge_simplified_installer-edge_ostree_pull_device
rhel_9.3-aarch64-edge_simplified_installer-edge_ostree_pull_device_fips
rhel_9.3-aarch64-edge_vsphere-edge_ostree_pull_empty
rhel_9.3-aarch64-edge_vsphere-edge_ostree_pull_fips
rhel_9.3-aarch64-edge_vsphere-ostree_filesystem_customizations
rhel_9.3-x86_64-tar-empty
rhel_9.3-aarch64-tar-empty
rhel_9.4-aarch64-edge_ami-edge_ostree_pull_user
rhel_9.4-aarch64-edge_ami-edge_ostree_pull_user_fips
rhel_9.4-aarch64-edge_ami-ostree_filesystem_customizations
rhel_9.4-aarch64-edge_commit-embed_containers
rhel_9.4-aarch64-edge_commit-ostree
rhel_9.4-aarch64-edge_container-embed_containers_2
rhel_9.4-aarch64-edge_container-empty
rhel_9.4-aarch64-edge_container-ostree
rhel_9.4-aarch64-edge_installer-edge_ostree_pull_empty
rhel_9.4-aarch64-edge_installer-edge_ostree_pull_fips
rhel_9.4-aarch64-edge_installer-unattended_iso_edge
rhel_9.4-aarch64-edge_raw_image-edge_ostree_pull_empty
rhel_9.4-aarch64-edge_raw_image-edge_ostree_pull_fips
rhel_9.4-aarch64-edge_raw_image-ostree_filesystem_customizations
rhel_9.4-aarch64-edge_simplified_installer-edge_ostree_pull_device
rhel_9.4-aarch64-edge_simplified_installer-edge_ostree_pull_device_fips
rhel_9.4-aarch64-edge_vsphere-edge_ostree_pull_empty
rhel_9.4-aarch64-edge_vsphere-edge_ostree_pull_fips
rhel_9.4-aarch64-edge_vsphere-ostree_filesystem_customizations
rhel_9.4-x86_64-edge_ami-edge_ostree_pull_user
rhel_9.4-x86_64-edge_ami-edge_ostree_pull_user_fips
rhel_9.4-x86_64-edge_ami-ostree_filesystem_customizations
rhel_9.4-x86_64-edge_commit-embed_containers
rhel_9.4-x86_64-edge_commit-ostree
rhel_9.4-x86_64-edge_container-embed_containers_2
rhel_9.4-x86_64-edge_container-empty
rhel_9.4-x86_64-edge_container-ostree
rhel_9.4-x86_64-edge_installer-edge_ostree_pull_empty
rhel_9.4-x86_64-edge_installer-edge_ostree_pull_fips
rhel_9.4-x86_64-edge_installer-unattended_iso_edge
rhel_9.4-x86_64-edge_raw_image-edge_ostree_pull_empty
rhel_9.4-x86_64-edge_raw_image-edge_ostree_pull_fips
rhel_9.4-x86_64-edge_raw_image-ostree_filesystem_customizations
rhel_9.4-x86_64-edge_simplified_installer-edge_ostree_pull_device
rhel_9.4-x86_64-edge_simplified_installer-edge_ostree_pull_device_fips
rhel_9.4-x86_64-edge_vsphere-edge_ostree_pull_empty
rhel_9.4-x86_64-edge_vsphere-edge_ostree_pull_fips
rhel_9.4-x86_64-edge_vsphere-ostree_filesystem_customizations
rhel_9.4-aarch64-tar-empty
rhel_9.4-x86_64-tar-empty
rhel_8.9-aarch64-edge_commit-embed_containers
rhel_8.9-aarch64-edge_commit-ostree
rhel_8.9-aarch64-edge_container-embed_containers_2
rhel_8.9-aarch64-edge_container-empty
rhel_8.9-aarch64-edge_container-ostree
rhel_8.9-aarch64-edge_installer-edge_ostree_pull_empty
rhel_8.9-aarch64-edge_installer-unattended_iso_edge
rhel_8.9-aarch64-edge_raw_image-edge_ostree_pull_empty
rhel_8.9-aarch64-edge_simplified_installer-edge_ostree_pull_device
rhel_8.9-x86_64-edge_commit-embed_containers
rhel_8.9-x86_64-edge_commit-ostree
rhel_8.9-x86_64-edge_container-embed_containers_2
rhel_8.9-x86_64-edge_container-empty
rhel_8.9-x86_64-edge_container-ostree
rhel_8.9-x86_64-edge_installer-edge_ostree_pull_empty
rhel_8.9-x86_64-edge_installer-unattended_iso_edge
rhel_8.9-x86_64-edge_raw_image-edge_ostree_pull_empty
rhel_8.9-x86_64-edge_simplified_installer-edge_ostree_pull_device
rhel_8.9-aarch64-qcow2-all_with_oscap
rhel_8.9-x86_64-qcow2-all_with_oscap
rhel_8.10-aarch64-edge_commit-embed_containers
rhel_8.10-aarch64-edge_commit-ostree
rhel_8.10-aarch64-edge_container-embed_containers_2
rhel_8.10-aarch64-edge_container-empty
rhel_8.10-aarch64-edge_container-ostree
rhel_8.10-aarch64-edge_installer-edge_ostree_pull_empty
rhel_8.10-aarch64-edge_installer-unattended_iso_edge
rhel_8.10-aarch64-edge_raw_image-edge_ostree_pull_empty
rhel_8.10-aarch64-edge_simplified_installer-edge_ostree_pull_device
rhel_8.10-x86_64-edge_commit-embed_containers
rhel_8.10-x86_64-edge_commit-ostree
rhel_8.10-x86_64-edge_container-embed_containers_2
rhel_8.10-x86_64-edge_container-empty
rhel_8.10-x86_64-edge_container-ostree
rhel_8.10-x86_64-edge_installer-edge_ostree_pull_empty
rhel_8.10-x86_64-edge_installer-unattended_iso_edge
rhel_8.10-x86_64-edge_raw_image-edge_ostree_pull_empty
rhel_8.10-x86_64-edge_simplified_installer-edge_ostree_pull_device
fedora_39-aarch64-ami-empty
fedora_39-aarch64-iot_commit-kernel_debug
fedora_39-x86_64-ami-empty
fedora_39-x86_64-iot_commit-kernel_debug
fedora_39-aarch64-qcow2-empty
fedora_39-aarch64-qcow2-minimal
fedora_39-aarch64-qcow2-minimal_pkgs
fedora_39-x86_64-qcow2-empty
fedora_39-x86_64-qcow2-minimal
fedora_39-x86_64-qcow2-minimal_pkgs
fedora_39-x86_64-iot_installer-iot_ostree_pull_empty
fedora_39-aarch64-iot_installer-iot_ostree_pull_empty
fedora_39-aarch64-iot_qcow2_image-iot_ostree_pull_empty
fedora_39-aarch64-iot_raw_image-iot_ostree_pull_empty
fedora_39-aarch64-iot_simplified_installer-iot_ostree_pull_device
fedora_39-x86_64-iot_qcow2_image-iot_ostree_pull_empty
fedora_39-x86_64-iot_raw_image-iot_ostree_pull_empty
fedora_39-x86_64-iot_simplified_installer-iot_ostree_pull_device
fedora_39-x86_64-minimal_raw-empty
fedora_39-x86_64-oci-empty
fedora_39-aarch64-minimal_raw-empty
fedora_39-aarch64-oci-empty
fedora_39-aarch64-openstack-empty
fedora_39-aarch64-qcow2-all_customizations
fedora_39-aarch64-qcow2-all_with_fips
fedora_39-aarch64-qcow2-all_with_oscap
fedora_39-aarch64-qcow2-empty
fedora_39-aarch64-qcow2-minimal
fedora_39-aarch64-qcow2-minimal_pkgs
fedora_39-x86_64-vhd-empty
fedora_39-x86_64-vmdk-empty
fedora_39-x86_64-openstack-empty
fedora_39-x86_64-qcow2-all_customizations
fedora_39-x86_64-qcow2-all_with_fips
fedora_39-x86_64-qcow2-all_with_oscap
fedora_39-x86_64-qcow2-empty
fedora_39-x86_64-qcow2-minimal
fedora_39-x86_64-qcow2-minimal_pkgs
centos_8-aarch64-edge_installer-edge_ostree_pull_empty
centos_8-aarch64-edge_raw_image-edge_ostree_pull_empty
centos_8-aarch64-edge_simplified_installer-edge_ostree_pull_device
centos_8-x86_64-edge_installer-edge_ostree_pull_empty
centos_8-x86_64-edge_raw_image-edge_ostree_pull_empty
centos_8-x86_64-edge_simplified_installer-edge_ostree_pull_device
centos_8-aarch64-qcow2-all_with_oscap
centos_8-x86_64-qcow2-all_with_oscap
centos_8-x86_64-qcow2_customize-boot
centos_8-aarch64-qcow2_customize-boot
centos_9-aarch64-edge_ami-edge_ostree_pull_user
centos_9-x86_64-edge_ami-edge_ostree_pull_user
centos_9-aarch64-edge_installer-edge_ostree_pull_empty
centos_9-aarch64-edge_raw_image-edge_ostree_pull_empty
centos_9-aarch64-edge_simplified_installer-edge_ostree_pull_device
centos_9-aarch64-edge_vsphere-edge_ostree_pull_empty
centos_9-x86_64-edge_installer-edge_ostree_pull_empty
centos_9-x86_64-edge_raw_image-edge_ostree_pull_empty
centos_9-x86_64-edge_simplified_installer-edge_ostree_pull_device
centos_9-x86_64-edge_vsphere-edge_ostree_pull_empty
centos_9-aarch64-qcow2-all_with_oscap
centos_9-aarch64-tar-empty
centos_9-x86_64-qcow2-all_with_oscap
centos_9-x86_64-tar-empty
1 change: 0 additions & 1 deletion test/cases/gen_db
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ with open(OS_RELEASE_PATH, 'r', encoding='utf-8') as f:
config.read_string(config_string)
distro = f"{config.get('DEFAULT', 'ID')}-{config.get('DEFAULT', 'VERSION_ID')}"
distro = distro.replace('"', '')
distro = distro.replace('.', '')

print(f"Running the osbuild-image-test for arch {platform.machine()} and "
f"distribution {distro}")
Expand Down
10 changes: 8 additions & 2 deletions tools/import-image-tests
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def list_tests(source: Union[str, pathlib.Path]) -> Iterator[Tuple[str, str]]:
def load_test(name: str, fullpath: Union[str, pathlib.Path], filters: Dict[str, List[str]]) -> Dict[str, Any]:
with open(fullpath, "r", encoding="utf-8") as f:
data = json.load(f)

manifest = data.get("manifest")
if not manifest:
raise ValueError("no 'manifest' to be found in manifest json")
Expand Down Expand Up @@ -119,7 +118,7 @@ def parse_distro(ci_file: Union[str, pathlib.Path]) -> Dict[str, List[str]]:
elif "centos" in flavor:
distro = f"centos-{flavor.split('-')[2]}"
elif "rhel" in flavor:
distro = f"rhel-{flavor.split('-')[1].replace('.', '')}"
distro = f"rhel-{flavor.split('-')[1]}"
else:
raise ValueError(f"unknown distribution {flavor}")
if distro in filters:
Expand All @@ -128,6 +127,11 @@ def parse_distro(ci_file: Union[str, pathlib.Path]) -> Dict[str, List[str]]:
filters[distro] = [arch]
return filters


def report_filters(filters) -> None:
print(f"{RESET} Filters: {filters} {RESET}", flush=True)


def parse_db_ignore(db_ignore_file: Union[str, pathlib.Path]) -> List[str]:
with open(db_ignore_file, "r", encoding="utf-8") as f:
return f.read().splitlines()
Expand Down Expand Up @@ -188,6 +192,8 @@ def main():

filters = parse_distro(args.filter_with_ci_distros)

report_filters(filters)

idx = 0
failures = []
ignored = []
Expand Down

0 comments on commit ecb8769

Please sign in to comment.