[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 07/12] tests: Add NetBSD image
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v5 07/12] tests: Add NetBSD image |
Date: |
Thu, 31 Aug 2017 14:42:57 +0800 |
The image is prepared following instructions as in:
https://wiki.qemu.org/Hosts/BSD
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Kamil Rytarowski <address@hidden>
---
tests/vm/netbsd | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100755 tests/vm/netbsd
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
new file mode 100755
index 0000000000..559e89c8a6
--- /dev/null
+++ b/tests/vm/netbsd
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# NetBSD VM image
+#
+# Copyright (C) 2017 Red Hat Inc.
+#
+# Authors:
+# Fam Zheng <address@hidden>
+#
+# This work is licensed under the terms of the GNU GPL, version 2. See
+# the COPYING file in the top-level directory.
+#
+
+import os
+import sys
+import subprocess
+import basevm
+
+class NetBSDVM(basevm.BaseVM):
+ name = "netbsd"
+ BUILD_SCRIPT = """
+ set -e;
+ cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
+ tar -xf /dev/rld1a;
+ ./configure --python=python2.7 {configure_opts};
+ gmake -j{jobs};
+ gmake check;
+ """
+
+ def build_image(self, img):
+ cimg =
self._download_with_cache("http://download.patchew.org/netbsd-7.1-amd64.img.xz",
+
sha256sum='b633d565b0eac3d02015cd0c81440bd8a7a8df8512615ac1ee05d318be015732')
+ img_tmp_xz = img + ".tmp.xz"
+ img_tmp = img + ".tmp"
+ subprocess.check_call(["cp", "-f", cimg, img_tmp_xz])
+ subprocess.check_call(["xz", "-df", img_tmp_xz])
+ if os.path.exists(img):
+ os.remove(img)
+ os.rename(img_tmp, img)
+
+if __name__ == "__main__":
+ sys.exit(basevm.main(NetBSDVM))
--
2.13.5
- [Qemu-devel] [PATCH v5 00/12] tests: Add VM based build tests (for non-x86_64 and/or non-Linux), Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 01/12] gitignore: Ignore vm test images, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 02/12] qemu.py: Add "wait()" method, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 03/12] scripts: Add archive-source.sh, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 04/12] tests: Add vm test lib, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 05/12] tests: Add ubuntu.i386 image, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 06/12] tests: Add FreeBSD image, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 07/12] tests: Add NetBSD image,
Fam Zheng <=
- [Qemu-devel] [PATCH v5 08/12] tests: Add OpenBSD image, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 09/12] Makefile: Add rules to run vm tests, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 10/12] MAINTAINERS: Add tests/vm entry, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 11/12] tests: Add README for vm tests, Fam Zheng, 2017/08/31
- [Qemu-devel] [PATCH v5 12/12] docker: Use archive-source.py, Fam Zheng, 2017/08/31
- Re: [Qemu-devel] [PATCH v5 00/12] tests: Add VM based build tests (for non-x86_64 and/or non-Linux), no-reply, 2017/08/31
- Re: [Qemu-devel] [PATCH v5 00/12] tests: Add VM based build tests (for non-x86_64 and/or non-Linux), Kamil Rytarowski, 2017/08/31