aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/netbsd
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-09-22 12:14:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-22 12:14:28 +0100
commita664607440511fdf8cff9d1c2afefbdbca1d1295 (patch)
tree60f1bea3059ad94867ed67ba1956556526653453 /tests/vm/netbsd
parent3aaa8d4499de2a8d07ccc2c8e6e362479e1d433f (diff)
parent4f6afe41f2ee3d8170eef7a9122d256588b707b2 (diff)
downloadqemu-a664607440511fdf8cff9d1c2afefbdbca1d1295.zip
qemu-a664607440511fdf8cff9d1c2afefbdbca1d1295.tar.gz
qemu-a664607440511fdf8cff9d1c2afefbdbca1d1295.tar.bz2
Merge remote-tracking branch 'remotes/famz/tags/build-and-test-automation-pull-request' into staging
# gpg: Signature made Fri 22 Sep 2017 08:28:38 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/build-and-test-automation-pull-request: (36 commits) docker: Drop 'set -e' from run script docker: Use archive-source.py tests: Add README for vm tests MAINTAINERS: Add tests/vm entry Makefile: Add rules to run vm tests tests: Add OpenBSD image tests: Add NetBSD image tests: Add FreeBSD image tests: Add ubuntu.i386 image tests: Add vm test lib tests: Add a test key pair scripts: Add archive-source.sh qemu.py: Add "wait()" method gitignore: Ignore vm test images MAINTAINERS: Fix subsystem name for "Build and test automation" buildsys: Move rdma libs to per object buildsys: Move brlapi libs to per object buildsys: Move usb redir cflags/libs to per object buildsys: Move libusb cflags/libs to per object buildsys: Move libcacard cflags/libs to per object ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/vm/netbsd')
-rwxr-xr-xtests/vm/netbsd42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
new file mode 100755
index 0000000..3972d8b
--- /dev/null
+++ b/tests/vm/netbsd
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#
+# NetBSD VM image
+#
+# Copyright 2017 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
+
+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))