summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2021-08-31 16:27:43 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-09-02 16:36:23 -0400
commit0f2e3d24a438c120718a845b04dd85b9d5ce1956 (patch)
tree3031ceaf6cc2dda051d86a625cea857185fa0b60 /recipes-extended
parent12fb6aaffe7ef95e2ed7162059c1e72c7bf5931d (diff)
downloadmeta-virtualization-0f2e3d24a438c120718a845b04dd85b9d5ce1956.tar.gz
xtf: add testimage integration to run XTF test cases in OEQA
Add a new minimal OEQA test case to run the Xen Test Framework test runner in the standard testimage step. Tested with qemux86-64 and designed for compatibility with Arm when XTF supports it. To enable, append to local.conf: INHERIT += "testimage" QEMU_USE_SLIRP = "1" TEST_SERVER_IP = "127.0.0.1" To run: bitbake -c testimage xtf-image For inspection while it runs, at another shell prompt: * Observe the image booting: tail -f ${TMPDIR}/work/qemux86_64-*/xtf-image/*/testimage/qemu_boot_log.* * Observe the tests running once boot has completed: tail -f ${TMPDIR}/work/qemux86_64-*/xtf-image/*/temp/log.do_testimage The XTF test sequence by default is a single XTF test case with minimal hardware dependency to ensure that Xen is running, the Xen toolstack is functional and XTF works. Additional XTF test cases for an image can be configured via variables that are documented in the OEQA test case: * XTF_TEST_CASES_POPULATE * XTF_TEST_CASES_SKIP * XTF_TEST_CASES_REQUIRE Since testimage requires a functioning network to perform the tests on the image and the qemu MACHINES do not have networking enabled this commit provides a new qemuboot-testimage-network bbclass to add an image postprocess command to enable a functional eth0 for qemu MACHINES. Signed-off-by: Christopher Clark <christopher.clark@starlab.io> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/images/xen-image-minimal.bb2
-rw-r--r--recipes-extended/images/xtf-image.bb15
2 files changed, 16 insertions, 1 deletions
diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb
index fbdd007b..ea596ceb 100644
--- a/recipes-extended/images/xen-image-minimal.bb
+++ b/recipes-extended/images/xen-image-minimal.bb
@@ -31,7 +31,7 @@ XEN_PCIBACK_MODULE:x86-64 = "kernel-module-xen-pciback"
31 31
32LICENSE = "MIT" 32LICENSE = "MIT"
33 33
34inherit core-image qemuboot-xen-defaults qemuboot-xen-dtb 34inherit core-image qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network
35 35
36do_check_xen_state() { 36do_check_xen_state() {
37 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then 37 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then
diff --git a/recipes-extended/images/xtf-image.bb b/recipes-extended/images/xtf-image.bb
index b73e4a59..a78959df 100644
--- a/recipes-extended/images/xtf-image.bb
+++ b/recipes-extended/images/xtf-image.bb
@@ -11,9 +11,24 @@ DESCRIPTION = "A minimal Xen Test Framework (XTF) image for testing the Xen hype
11# ./xtf-runner --list pv 11# ./xtf-runner --list pv
12# # run an example test: 12# # run an example test:
13# ./xtf-runner test-pv64-livepatch-priv-check 13# ./xtf-runner test-pv64-livepatch-priv-check
14#
15# This image also supports the OE QA framework, so XTF tests can be
16# run from bitbake by adding the following (or similar) to local.conf:
17#
18# INHERIT += "testimage"
19# QEMU_USE_SLIRP = "1"
20# TEST_SERVER_IP = "127.0.0.1"
21#
22# and the tests that are configured (see the xtf-oeqa-conf package)
23# can be run with: bitbake -c testimage xtf-image
24#
25# For testimage, see the qemu boot log: ${WORKDIR}/testimage/qemu_boot_log.*
26# and the test log: ${WORKDIR}/temp/log.do_testimage
14 27
15IMAGE_NAME="xtf" 28IMAGE_NAME="xtf"
16 29
17IMAGE_INSTALL:append = " xtf" 30IMAGE_INSTALL:append = " xtf"
18 31
32DEFAULT_TEST_SUITES:append = " xtf_minimal"
33
19QB_DEFAULT_FSTYPE_x86-64 = "wic" 34QB_DEFAULT_FSTYPE_x86-64 = "wic"