diff options
Diffstat (limited to 'recipes-test/virt-test/virt-test_git.bb')
-rw-r--r-- | recipes-test/virt-test/virt-test_git.bb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/recipes-test/virt-test/virt-test_git.bb b/recipes-test/virt-test/virt-test_git.bb new file mode 100644 index 0000000..ea588f0 --- /dev/null +++ b/recipes-test/virt-test/virt-test_git.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SUMMARY = "Linux Virtualization Tests" | ||
2 | DESCRIPTION = "virt-test is a Linux virtualization test suite, intended to be used in conjunction with the autotest framework" | ||
3 | HOMEPAGE = "https://github.com/autotest/virt-test" | ||
4 | SECTION = "console/tests" | ||
5 | LICENSE = "GPLv2 & MIT & PSF" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ca2697f94d6c6ecb0c4ed70d4bca81e2 \ | ||
7 | file://README.rst;md5=3f0b5623cfac6b30670bd27eb823e12e" | ||
8 | |||
9 | RDEPENDS_${PN} = "autotest tcpdump iputils netcat-openbsd virt-manager procps \ | ||
10 | less python-logging python-shell python-resource python-subprocess \ | ||
11 | python-netclient python-email python-compression python-unixadmin \ | ||
12 | python-ctypes python-html python-terminal python-distutils \ | ||
13 | python-math python-numbers python-xml python-db" | ||
14 | |||
15 | DEPENDS += "python" | ||
16 | |||
17 | # We cannot use the default do_compile etc. from distutils, so just use | ||
18 | # distutils-base to get all the correct paths. | ||
19 | inherit distutils-base | ||
20 | |||
21 | # SRCREV reflects the packaged PV | ||
22 | PV = "2014.04.14" | ||
23 | SRCREV = "b6ee5f288e16d5a72e562a567295d40d3a890fcb" | ||
24 | |||
25 | SRC_URI = "git://github.com/autotest/virt-test \ | ||
26 | file://remove_7za_dependency.patch \ | ||
27 | file://remove_gcc_dependency.patch \ | ||
28 | file://clear_mandatory_header_list.patch \ | ||
29 | file://do_not_upgrade_test_providers.patch \ | ||
30 | file://allow_bootstrap_3rd_party_image.patch \ | ||
31 | file://add_enea_linux_support.patch \ | ||
32 | file://virt-test-qemu_vm-add-monotonic-start-time.patch \ | ||
33 | file://dnsmasq-virt-test \ | ||
34 | file://virt-test-search-qemu-system-arch.patch \ | ||
35 | file://virt-test-ppc.patch \ | ||
36 | " | ||
37 | |||
38 | S = "${WORKDIR}/git" | ||
39 | B = "${S}" | ||
40 | |||
41 | FILES_${PN} += "/opt /etc/dnsmasq.d/virt-test" | ||
42 | FILES_${PN}-dbg += "/opt/${PN}/virttest/.debug/* /opt/${PN}/shared/scripts/.debug/*" | ||
43 | |||
44 | PACKAGES =+ "${PN}-guest-scripts-bin" | ||
45 | |||
46 | DESCRIPTION_${PN}-guest-scripts-bin = "Guest test binaries for virt-test" | ||
47 | FILES_${PN}-guest-scripts-bin = "/opt/${PN}/shared/scripts/pipetest" | ||
48 | |||
49 | python do_devshell_prepend() { | ||
50 | os.environ['BUILD_SYS']="${BUILD_SYS}" | ||
51 | os.environ['HOST_SYS']="${HOST_SYS}" | ||
52 | os.environ['STAGING_INCDIR']="${STAGING_INCDIR}" | ||
53 | os.environ['STAGING_LIBDIR']="${STAGING_LIBDIR}" | ||
54 | } | ||
55 | |||
56 | do_compile() { | ||
57 | # _passfd.so | ||
58 | export BUILD_SYS="${BUILD_SYS}" | ||
59 | export HOST_SYS="${HOST_SYS}" | ||
60 | export STAGING_INCDIR="${STAGING_INCDIR}" | ||
61 | export STAGING_LIBDIR="${STAGING_LIBDIR}" | ||
62 | cd ${S}/virttest | ||
63 | python passfd_setup.py ${DISTUTILS_BUILD_ARGS} | ||
64 | |||
65 | # guest-scripts-bin | ||
66 | cd ${S}/shared/scripts/ | ||
67 | ${CC} ${CFLAGS} ${LDFLAGS} pipetest.c -o pipetest | ||
68 | } | ||
69 | |||
70 | do_install() { | ||
71 | install -d ${D}/opt/${PN} | ||
72 | cp -r --preserve=mode,links ${B}/* ${D}/opt/${PN} | ||
73 | rm -f ${D}/opt/${PN}/shared/data | ||
74 | mkdir -p ${D}/opt/${PN}/shared/data | ||
75 | mkdir -p ${D}/etc/dnsmasq.d/ | ||
76 | cp --preserve=mode,links ${WORKDIR}/dnsmasq-virt-test ${D}/etc/dnsmasq.d/virt-test | ||
77 | } | ||