diff --git a/.travis.yml b/.travis.yml index bc6c0c928..3ded80474 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,18 +14,47 @@ matrix: env: GO111MODULE=on # needed even for Go 1.12 script: go test -v ./... - name: image-test-empty-blueprint + arch: amd64 language: python python: 3.7 before_install: sudo apt-get install -y qemu-kvm genisoimage script: # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' - - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --cases test/cases/*_empty_blueprint.json + - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --arches x86_64 --cases test/cases/*_empty_blueprint.json - name: image-test-local-boot + arch: amd64 language: python python: 3.7 before_install: sudo apt-get install -y qemu-kvm genisoimage script: # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' - - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --cases test/cases/*_local_boot.json + - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --arches x86_64 --cases test/cases/*_local_boot.json + - name: image-test + arch: arm64 + language: python + python: 3.7 + before_install: sudo apt-get install -y qemu-kvm genisoimage + script: + # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... + - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' + - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --arches aarch64 + - name: image-test + arch: ppc64le + language: python + python: 3.7 + before_install: sudo apt-get install -y qemu-kvm genisoimage + script: + # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... + - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' + - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --arches ppc64le + - name: image-test + arch: s390x + language: python + python: 3.7 + before_install: sudo apt-get install -y qemu-kvm genisoimage + script: + # ubuntu's rpm package sets dbpath to ~/.rpmdb, which makes rpm fail... + - sudo sh -c 'mkdir /etc/rpm; echo "%_dbpath /var/lib/rpm" > /etc/rpm/macros' + - sudo env "PATH=$PATH" "PYTHONUNBUFFERED=1" "OSBUILD_TEST_BUILD_ENV=test/f27-build-from-ubuntu1804.json" test/run --arches s390x diff --git a/test/cases/ami_empty_blueprint.json b/test/cases/ami_empty_blueprint.json index 828b82c8b..549854960 100644 --- a/test/cases/ami_empty_blueprint.json +++ b/test/cases/ami_empty_blueprint.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "filename": "image.raw.xz", "output-format": "ami", "blueprint": {} diff --git a/test/cases/disk_empty_blueprint.json b/test/cases/disk_empty_blueprint.json index 9e3115f69..cc7b66efb 100644 --- a/test/cases/disk_empty_blueprint.json +++ b/test/cases/disk_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "partitioned-disk", "filename": "disk.img", "blueprint": {} diff --git a/test/cases/disk_local_boot.json b/test/cases/disk_local_boot.json index 7ba0a087c..67ab09ac3 100644 --- a/test/cases/disk_local_boot.json +++ b/test/cases/disk_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "partitioned-disk", "filename": "disk.img", "blueprint-draft": { diff --git a/test/cases/ext4_empty_blueprint.json b/test/cases/ext4_empty_blueprint.json index 5d8861327..7145c1af8 100644 --- a/test/cases/ext4_empty_blueprint.json +++ b/test/cases/ext4_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "ext4-filesystem", "filename": "filesystem.img", "blueprint": {} diff --git a/test/cases/ext4_local_boot.json b/test/cases/ext4_local_boot.json index 90b87578e..d31ab0fe2 100644 --- a/test/cases/ext4_local_boot.json +++ b/test/cases/ext4_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "ext4", "filename": "filesystem.img", "blueprint-draft": { diff --git a/test/cases/openstack_empty_blueprint.json b/test/cases/openstack_empty_blueprint.json index 3ce8c0e55..83ffeb10b 100644 --- a/test/cases/openstack_empty_blueprint.json +++ b/test/cases/openstack_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "openstack", "filename": "image.qcow2", "blueprint": {} diff --git a/test/cases/openstack_local_boot.json b/test/cases/openstack_local_boot.json index 3b0dc5571..16b5972ab 100644 --- a/test/cases/openstack_local_boot.json +++ b/test/cases/openstack_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "openstack", "filename": "image.qcow2", "blueprint-draft": { diff --git a/test/cases/qcow2_empty_blueprint.json b/test/cases/qcow2_empty_blueprint.json index ccaa96d71..88b9275e5 100644 --- a/test/cases/qcow2_empty_blueprint.json +++ b/test/cases/qcow2_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "qcow2", "filename": "image.qcow2", "blueprint": {} diff --git a/test/cases/qcow2_local_boot.json b/test/cases/qcow2_local_boot.json index 9651d9e83..57753ef28 100644 --- a/test/cases/qcow2_local_boot.json +++ b/test/cases/qcow2_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "qcow2", "filename": "image.qcow2", "blueprint-draft": { diff --git a/test/cases/tar_local_boot.json b/test/cases/tar_local_boot.json index 7cc518af7..b8b973470 100644 --- a/test/cases/tar_local_boot.json +++ b/test/cases/tar_local_boot.json @@ -5,6 +5,7 @@ "compose": { "output-format": "tar", "distro": "fedora-30", + "arch": "x86_64", "filename": "root.tar.xz", "blueprint-draft": { "name": "tar-boot-test", diff --git a/test/cases/vhd_empty_blueprint.json b/test/cases/vhd_empty_blueprint.json index c24c7fff3..82b9e7531 100644 --- a/test/cases/vhd_empty_blueprint.json +++ b/test/cases/vhd_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "vhd", "filename": "image.vhd", "blueprint": {} diff --git a/test/cases/vhd_local_boot.json b/test/cases/vhd_local_boot.json index aadb27e5a..eaf0a4606 100644 --- a/test/cases/vhd_local_boot.json +++ b/test/cases/vhd_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "vhd", "filename": "image.vhd", "blueprint-draft": { diff --git a/test/cases/vmdk_empty_blueprint.json b/test/cases/vmdk_empty_blueprint.json index e720dcc0c..21adc2a1f 100644 --- a/test/cases/vmdk_empty_blueprint.json +++ b/test/cases/vmdk_empty_blueprint.json @@ -1,6 +1,7 @@ { "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "vmdk", "filename": "disk.vmdk", "blueprint": {} diff --git a/test/cases/vmdk_local_boot.json b/test/cases/vmdk_local_boot.json index 7347c977f..e00641d0c 100644 --- a/test/cases/vmdk_local_boot.json +++ b/test/cases/vmdk_local_boot.json @@ -4,6 +4,7 @@ }, "compose": { "distro": "fedora-30", + "arch": "x86_64", "output-format": "vmdk", "filename": "disk.vmdk", "blueprint-draft": { diff --git a/test/run b/test/run index 3ced6ff14..94e96270e 100755 --- a/test/run +++ b/test/run @@ -227,6 +227,7 @@ def run_test(case, private_key, store): def main(): parser = argparse.ArgumentParser(description='Run test cases.') parser.add_argument('--cases', type=str, nargs='*', help='Limit tests to given cases.') + parser.add_argument('--arches', type=str, nargs='*', help='Limit tests to given architectures.') parser.add_argument('--distros', type=str, nargs='*', help='Limit tests to given distros.') arg = parser.parse_args() @@ -242,6 +243,10 @@ def main(): if case["compose"]["distro"] not in arg.distros: continue + if arg.arches: + if case["compose"]["arch"] not in arg.arches: + continue + print(f"RUNNING: {filename}") if run_test(case, private_key, store): print(f"SUCCESS")