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:
Tom Gundersen 2019-12-10 01:52:39 +01:00 committed by Lars Karlitski
parent 9bedc0c393
commit 0d091decb5
16 changed files with 50 additions and 2 deletions

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"filename": "image.raw.xz",
"output-format": "ami",
"blueprint": {}

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "partitioned-disk",
"filename": "disk.img",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "partitioned-disk",
"filename": "disk.img",
"blueprint-draft": {

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "ext4-filesystem",
"filename": "filesystem.img",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "ext4",
"filename": "filesystem.img",
"blueprint-draft": {

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "openstack",
"filename": "image.qcow2",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "openstack",
"filename": "image.qcow2",
"blueprint-draft": {

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "qcow2",
"filename": "image.qcow2",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "qcow2",
"filename": "image.qcow2",
"blueprint-draft": {

View file

@ -5,6 +5,7 @@
"compose": {
"output-format": "tar",
"distro": "fedora-30",
"arch": "x86_64",
"filename": "root.tar.xz",
"blueprint-draft": {
"name": "tar-boot-test",

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "vhd",
"filename": "image.vhd",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "vhd",
"filename": "image.vhd",
"blueprint-draft": {

View file

@ -1,6 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "vmdk",
"filename": "disk.vmdk",
"blueprint": {}

View file

@ -4,6 +4,7 @@
},
"compose": {
"distro": "fedora-30",
"arch": "x86_64",
"output-format": "vmdk",
"filename": "disk.vmdk",
"blueprint-draft": {

View file

@ -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")