From 758da82203289e1d0f607b7e4c5e48e35e66d4ed Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Sep 2022 13:30:03 +0200 Subject: podman: Add ptest support for system tests Signed-off-by: Andrei Gherzan Signed-off-by: Bruce Ashfield --- recipes-containers/podman/podman/run-ptest | 13 +++++++++++++ recipes-containers/podman/podman_git.bb | 27 ++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 recipes-containers/podman/podman/run-ptest diff --git a/recipes-containers/podman/podman/run-ptest b/recipes-containers/podman/podman/run-ptest new file mode 100644 index 00000000..108ff451 --- /dev/null +++ b/recipes-containers/podman/podman/run-ptest @@ -0,0 +1,13 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: MIT + +# +# Podman system tests +# + +# The system tests don't need any go related variables. Dummy-define them to +# avoid useless warnings/errors. +GOOS=undefined GO=true BUILDTAGS= make localsystem diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index c2f4e506..e3bc908f 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb @@ -21,6 +21,7 @@ SRCREV = "754ec89a8a185d308ca5ed08afaf34d6cbda08da" SRC_URI = " \ git://github.com/containers/libpod.git;branch=v4.2;protocol=https \ ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ + file://run-ptest \ " LICENSE = "Apache-2.0" @@ -49,7 +50,7 @@ TOOLCHAIN = "gcc" export BUILDFLAGS="${GOBUILDFLAGS}" inherit go goarch -inherit systemd pkgconfig +inherit systemd pkgconfig ptest do_configure[noexec] = "1" @@ -110,6 +111,17 @@ do_install() { fi } +do_install_ptest () { + cp ${S}/src/import/Makefile ${D}${PTEST_PATH} + install -d ${D}${PTEST_PATH}/test + cp -r ${S}/src/import/test/system ${D}${PTEST_PATH}/test + + # Some compatibility links for the Makefile assumptions. + install -d ${D}${PTEST_PATH}/bin + ln -s ${bindir}/podman ${D}${PTEST_PATH}/bin/podman + ln -s ${bindir}/podman-remote ${D}${PTEST_PATH}/bin/podman-remote +} + FILES:${PN} += " \ ${systemd_unitdir}/system/* \ ${systemd_unitdir}/user/* \ @@ -129,3 +141,16 @@ RDEPENDS:${PN} += "\ " RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" + +RDEPENDS:${PN}-ptest += " \ + bash \ + bats \ + buildah \ + catatonit \ + coreutils \ + file \ + gnupg \ + jq \ + make \ + tar \ +" -- cgit v1.2.3-54-g00ecf