diff options
author | Andrei Gherzan <andrei.gherzan@huawei.com> | 2022-09-05 13:30:03 +0200 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-09-16 11:13:31 -0400 |
commit | 758da82203289e1d0f607b7e4c5e48e35e66d4ed (patch) | |
tree | 2bbc7e81aa24b94107e46b2e09d2f1e171b6a9fc | |
parent | 481b716f7c79a5561266b4b837590dde71603b99 (diff) | |
download | meta-virtualization-758da82203289e1d0f607b7e4c5e48e35e66d4ed.tar.gz |
podman: Add ptest support for system tests
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/podman/podman/run-ptest | 13 | ||||
-rw-r--r-- | recipes-containers/podman/podman_git.bb | 27 |
2 files changed, 39 insertions, 1 deletions
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # SPDX-FileCopyrightText: Huawei Inc. | ||
4 | # | ||
5 | # SPDX-License-Identifier: MIT | ||
6 | |||
7 | # | ||
8 | # Podman system tests | ||
9 | # | ||
10 | |||
11 | # The system tests don't need any go related variables. Dummy-define them to | ||
12 | # avoid useless warnings/errors. | ||
13 | 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" | |||
21 | SRC_URI = " \ | 21 | SRC_URI = " \ |
22 | git://github.com/containers/libpod.git;branch=v4.2;protocol=https \ | 22 | git://github.com/containers/libpod.git;branch=v4.2;protocol=https \ |
23 | ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ | 23 | ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ |
24 | file://run-ptest \ | ||
24 | " | 25 | " |
25 | 26 | ||
26 | LICENSE = "Apache-2.0" | 27 | LICENSE = "Apache-2.0" |
@@ -49,7 +50,7 @@ TOOLCHAIN = "gcc" | |||
49 | export BUILDFLAGS="${GOBUILDFLAGS}" | 50 | export BUILDFLAGS="${GOBUILDFLAGS}" |
50 | 51 | ||
51 | inherit go goarch | 52 | inherit go goarch |
52 | inherit systemd pkgconfig | 53 | inherit systemd pkgconfig ptest |
53 | 54 | ||
54 | do_configure[noexec] = "1" | 55 | do_configure[noexec] = "1" |
55 | 56 | ||
@@ -110,6 +111,17 @@ do_install() { | |||
110 | fi | 111 | fi |
111 | } | 112 | } |
112 | 113 | ||
114 | do_install_ptest () { | ||
115 | cp ${S}/src/import/Makefile ${D}${PTEST_PATH} | ||
116 | install -d ${D}${PTEST_PATH}/test | ||
117 | cp -r ${S}/src/import/test/system ${D}${PTEST_PATH}/test | ||
118 | |||
119 | # Some compatibility links for the Makefile assumptions. | ||
120 | install -d ${D}${PTEST_PATH}/bin | ||
121 | ln -s ${bindir}/podman ${D}${PTEST_PATH}/bin/podman | ||
122 | ln -s ${bindir}/podman-remote ${D}${PTEST_PATH}/bin/podman-remote | ||
123 | } | ||
124 | |||
113 | FILES:${PN} += " \ | 125 | FILES:${PN} += " \ |
114 | ${systemd_unitdir}/system/* \ | 126 | ${systemd_unitdir}/system/* \ |
115 | ${systemd_unitdir}/user/* \ | 127 | ${systemd_unitdir}/user/* \ |
@@ -129,3 +141,16 @@ RDEPENDS:${PN} += "\ | |||
129 | " | 141 | " |
130 | RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" | 142 | RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" |
131 | RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" | 143 | RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" |
144 | |||
145 | RDEPENDS:${PN}-ptest += " \ | ||
146 | bash \ | ||
147 | bats \ | ||
148 | buildah \ | ||
149 | catatonit \ | ||
150 | coreutils \ | ||
151 | file \ | ||
152 | gnupg \ | ||
153 | jq \ | ||
154 | make \ | ||
155 | tar \ | ||
156 | " | ||