All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Gherzan <andrei@gherzan.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: andrei@gherzan.com, Andrei Gherzan <andrei.gherzan@huawei.com>
Subject: [meta-virtualization][master][PATCH 2/2] podman: Add ptest support for system tests
Date: Mon,  5 Sep 2022 13:30:03 +0200	[thread overview]
Message-ID: <20220905113003.1730364-2-andrei@gherzan.com> (raw)
In-Reply-To: <20220905113003.1730364-1-andrei@gherzan.com>

From: Andrei Gherzan <andrei.gherzan@huawei.com>

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 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 0000000..108ff45
--- /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 e999192..e0d7164 100644
--- a/recipes-containers/podman/podman_git.bb
+++ b/recipes-containers/podman/podman_git.bb
@@ -23,6 +23,7 @@ SRC_URI = " \
     file://0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch;patchdir=src/import \
     file://0002-Define-ActKillThread-equal-to-ActKill.patch;patchdir=src/import/vendor/github.com/seccomp/libseccomp-golang \
     ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \
+    file://run-ptest \
 "
 
 LICENSE = "Apache-2.0"
@@ -48,7 +49,7 @@ export LDFLAGS=""
 TOOLCHAIN = "gcc"
 
 inherit go goarch
-inherit systemd pkgconfig
+inherit systemd pkgconfig ptest
 
 do_configure[noexec] = "1"
 
@@ -109,6 +110,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/* \
@@ -128,3 +140,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 \
+"
-- 
2.25.1



  reply	other threads:[~2022-09-05 11:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 11:30 [meta-virtualization][master][PATCH 1/2] catatonit: Integrate version 0.1.7 Andrei Gherzan
2022-09-05 11:30 ` Andrei Gherzan [this message]
2022-09-16 15:23 ` Bruce Ashfield
2022-09-16 23:15   ` Andrei Gherzan
2022-09-16 23:46     ` Bruce Ashfield
2022-09-17 16:56       ` Andrei Gherzan
2022-09-19 14:31         ` Bruce Ashfield
2022-09-20 12:03           ` Andrei Gherzan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220905113003.1730364-2-andrei@gherzan.com \
    --to=andrei@gherzan.com \
    --cc=andrei.gherzan@huawei.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.