test: add provisional multi-arch support
Currently we still only build for x86_64, but now the test suite is prepared for hooking up other architectures. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
9bedc0c393
commit
0d091decb5
16 changed files with 50 additions and 2 deletions
33
.travis.yml
33
.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
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"filename": "image.raw.xz",
|
||||
"output-format": "ami",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "partitioned-disk",
|
||||
"filename": "disk.img",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "partitioned-disk",
|
||||
"filename": "disk.img",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "ext4-filesystem",
|
||||
"filename": "filesystem.img",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "ext4",
|
||||
"filename": "filesystem.img",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "openstack",
|
||||
"filename": "image.qcow2",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "openstack",
|
||||
"filename": "image.qcow2",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "qcow2",
|
||||
"filename": "image.qcow2",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "qcow2",
|
||||
"filename": "image.qcow2",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"compose": {
|
||||
"output-format": "tar",
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"filename": "root.tar.xz",
|
||||
"blueprint-draft": {
|
||||
"name": "tar-boot-test",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vhd",
|
||||
"filename": "image.vhd",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vhd",
|
||||
"filename": "image.vhd",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vmdk",
|
||||
"filename": "disk.vmdk",
|
||||
"blueprint": {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
},
|
||||
"compose": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vmdk",
|
||||
"filename": "disk.vmdk",
|
||||
"blueprint-draft": {
|
||||
|
|
|
|||
5
test/run
5
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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue