summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2021-04-16 11:41:35 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-04-18 20:19:28 -0400
commit5f51e806b8f56c30eb160c21d241c73268a4dedf (patch)
treee6e36b6e1846fc6a51cfa15b2c1456983115cd32 /recipes-extended
parente9bda61a3dac0f98943ec6193f7d3e37a7779c6c (diff)
downloadmeta-virtualization-5f51e806b8f56c30eb160c21d241c73268a4dedf.tar.gz
xtf: introduce recipe for the Xen Test Framework
Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/xen/xtf_git.bb72
1 files changed, 72 insertions, 0 deletions
diff --git a/recipes-extended/xen/xtf_git.bb b/recipes-extended/xen/xtf_git.bb
new file mode 100644
index 00000000..db086435
--- /dev/null
+++ b/recipes-extended/xen/xtf_git.bb
@@ -0,0 +1,72 @@
1SUMMARY = "Xen Test Framework"
2HOMEPAGE = "https://xenbits.xenproject.org/docs/xtf/"
3LICENSE = "BSD-2-Clause"
4
5# For additional reference on XTF, please see:
6# https://static.sched.com/hosted_files/xendeveloperanddesignsummit2017/79/xtf.pdf
7
8SRC_URI = "git://xenbits.xen.org/xtf"
9SRCREV = "8ab15139728a8efd3ebbb60beb16a958a6a93fa1"
10
11COMPATIBLE_HOST = '(x86_64.*).*-linux'
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=a5680865974e05cf0510615ee1d745d8"
14
15PV = "0+git${SRCPV}"
16
17S = "${WORKDIR}/git"
18
19inherit python3native
20
21# To build 32-bit binaries some files from 32-bit glibc are needed.
22# To enable multilib, please add the following to your local.conf -:
23#
24# require conf/multilib.conf
25# MULTILIBS = "multilib:lib32"
26# DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
27
28# Use this multilib prefix for x86 32-bit to match local.conf:
29MLPREFIX32 = "lib32-"
30# Add the multilib 32-bit glibc to DEPENDS only when necessary:
31# The DEPENDS on a multilib 32-bit glibc is only added when target is x86-64
32# This x86-64 override is never intended for native use, so clear that.
33GLIBC32 = ""
34GLIBC32_x86-64 = "${MLPREFIX32}glibc"
35GLIBC32_class-native = ""
36DEPENDS += "${GLIBC32}"
37
38PACKAGES = "${PN}"
39
40FILES_${PN} = " \
41 ${libexecdir}/* \
42 "
43
44RDEPENDS_${PN} = " \
45 xen-tools-xl \
46 python3 \
47 "
48
49do_compile() {
50 oe_runmake CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} -I${RECIPE_SYSROOT}/../${MLPREFIX32}recipe-sysroot/usr/include" \
51 CPP="${CPP}" \
52 OBJCOPY="${OBJCOPY}" \
53 PYTHON="${PYTHON}"
54 # switch the shebang to python3
55 sed 's,^\(#!/usr/bin/env python\)$,\13,' -i "${B}/xtf-runner"
56}
57
58do_install() {
59 # packaging: rpmbuild can package the XTF test unikernels when they are
60 # installed as non-executable files (they are run within VMs anyway).
61 oe_runmake install DESTDIR="${D}" \
62 xtfdir="${libexecdir}/${BPN}" \
63 PYTHON="${PYTHON}" \
64 INSTALL_PROGRAM="install -m 644 -p"
65 install -m 755 -p "${B}/xtf-runner" "${D}${libexecdir}/${BPN}/xtf-runner"
66}
67
68INSANE_SKIP = "arch"
69# xen-tools-xl is a runtime but not build time dependency
70INSANE_SKIP_${PN} = "build-deps"
71INHIBIT_PACKAGE_STRIP = "1"
72INHIBIT_PACKAGE_DEBUG_SPLIT = "1"