aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm/centos
diff options
context:
space:
mode:
authorTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
committerTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
commite02cda008591317b1625707ff8e115a4841aa889 (patch)
treeaee302e3cf8b59ec2d32ec481be3d1afddfc8968 /tests/vm/centos
parentcc668e6b7e0ffd8c9d130513d12053cf5eda1d3b (diff)
Introduce Virtio-loopback epsilon release:
Epsilon release introduces a new compatibility layer which make virtio-loopback design to work with QEMU and rust-vmm vhost-user backend without require any changes. Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> Change-Id: I52e57563e08a7d0bdc002f8e928ee61ba0c53dd9
Diffstat (limited to 'tests/vm/centos')
-rwxr-xr-xtests/vm/centos52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/vm/centos b/tests/vm/centos
new file mode 100755
index 000000000..5c7bc1c1a
--- /dev/null
+++ b/tests/vm/centos
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+#
+# CentOS image
+#
+# Copyright 2018 Red Hat Inc.
+#
+# Authors:
+# Fam Zheng <famz@redhat.com>
+#
+# This code is licensed under the GPL version 2 or later. See
+# the COPYING file in the top-level directory.
+#
+
+import os
+import sys
+import subprocess
+import basevm
+import time
+
+class CentosVM(basevm.BaseVM):
+ name = "centos"
+ arch = "x86_64"
+ BUILD_SCRIPT = """
+ set -e;
+ cd $(mktemp -d);
+ export SRC_ARCHIVE=/dev/vdb;
+ sudo chmod a+r $SRC_ARCHIVE;
+ tar -xf $SRC_ARCHIVE;
+ make docker-test-block@centos8 {verbose} J={jobs} NETWORK=1;
+ make docker-test-quick@centos8 {verbose} J={jobs} NETWORK=1;
+ make docker-test-mingw@fedora {verbose} J={jobs} NETWORK=1;
+ """
+
+ def build_image(self, img):
+ cimg = self._download_with_cache("https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.3.2011-20201204.2.x86_64.qcow2")
+ img_tmp = img + ".tmp"
+ subprocess.check_call(["ln", "-f", cimg, img_tmp])
+ self.exec_qemu_img("resize", img_tmp, "50G")
+ self.boot(img_tmp, extra_args = ["-cdrom", self.gen_cloud_init_iso()])
+ self.wait_ssh()
+ self.ssh_root_check("touch /etc/cloud/cloud-init.disabled")
+ self.ssh_root_check("dnf update -y")
+ self.ssh_root_check("dnf install -y dnf-plugins-core")
+ self.ssh_root_check("dnf config-manager --set-enabled powertools")
+ self.ssh_root_check("dnf install -y podman make ninja-build git python3")
+ self.ssh_root("poweroff")
+ self.wait()
+ os.rename(img_tmp, img)
+ return 0
+
+if __name__ == "__main__":
+ sys.exit(basevm.main(CentosVM))