summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/classes/base-do-configure-modified.bbclass3
-rw-r--r--meta-selftest/conf/layer.conf4
-rw-r--r--meta-selftest/conf/multiconfig/muslmc.conf2
-rw-r--r--meta-selftest/files/static-group4
-rw-r--r--meta-selftest/files/static-passwd2
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py3
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/virgl.py2
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch31
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb77
-rw-r--r--meta-selftest/recipes-devtools/python/python-async-test.inc4
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb16
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc79
-rw-r--r--meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb15
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc8
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch24
-rw-r--r--meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb22
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch38
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch29
-rw-r--r--meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb66
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_%.bbappend (renamed from meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend)0
-rw-r--r--meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb21
-rw-r--r--meta-selftest/recipes-test/base-files/base-files_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/binutils/binutils_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/container-image/container-image-testpkg.bb2
-rw-r--r--meta-selftest/recipes-test/cpp/.gitignore1
-rw-r--r--meta-selftest/recipes-test/cpp/cmake-example.bb25
-rw-r--r--meta-selftest/recipes-test/cpp/cmake-example/run-ptest10
-rw-r--r--meta-selftest/recipes-test/cpp/cpp-example.inc24
-rw-r--r--meta-selftest/recipes-test/cpp/files/CMakeLists.txt61
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp33
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp21
-rw-r--r--meta-selftest/recipes-test/cpp/files/cpp-example.cpp18
-rw-r--r--meta-selftest/recipes-test/cpp/files/meson.build38
-rw-r--r--meta-selftest/recipes-test/cpp/files/meson.options3
-rw-r--r--meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp25
-rw-r--r--meta-selftest/recipes-test/cpp/meson-example.bb27
-rw-r--r--meta-selftest/recipes-test/cpp/meson-example/run-ptest10
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb4
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local/file31
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb5
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly.bb3
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-localonly/file31
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb2
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded6
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb16
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded15
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb22
-rw-r--r--meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded19
-rw-r--r--meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb20
-rw-r--r--meta-selftest/recipes-test/gitrepotest/gitrepotest.bb16
-rw-r--r--meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch9
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb4
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb5
-rw-r--r--meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc16
-rw-r--r--meta-selftest/recipes-test/images/oe-selftest-image.bb3
-rw-r--r--meta-selftest/recipes-test/images/wic-image-minimal.bb6
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license-alias.bb2
-rw-r--r--meta-selftest/recipes-test/license/incompatible-license.bb2
-rw-r--r--meta-selftest/recipes-test/license/incompatible-licenses.bb4
-rw-r--r--meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb2
-rw-r--r--meta-selftest/recipes-test/logging-test/logging-test.bb34
-rw-r--r--meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb26
-rw-r--r--meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb22
-rw-r--r--meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb10
-rw-r--r--meta-selftest/recipes-test/perlcross/perlcross_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/poison/poison.bb20
-rw-r--r--meta-selftest/recipes-test/postinst/postinst_1.0.bb20
-rw-r--r--meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb4
-rw-r--r--meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb4
-rw-r--r--meta-selftest/recipes-test/selftest-chown/selftest-chown.bb4
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb11
-rw-r--r--meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb2
-rw-r--r--meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb4
-rw-r--r--meta-selftest/recipes-test/selftest-hello/files/helloworld.c8
-rw-r--r--meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb19
-rw-r--r--meta-selftest/recipes-test/selftest-users/acreategroup.bb32
-rw-r--r--meta-selftest/recipes-test/selftest-users/bcreategroup.bb37
-rw-r--r--meta-selftest/recipes-test/selftest-users/ccreategroup.bb34
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup1.bb30
-rw-r--r--meta-selftest/recipes-test/selftest-users/creategroup2.bb32
-rw-r--r--meta-selftest/recipes-test/selftest-users/dcreategroup.bb33
-rw-r--r--meta-selftest/recipes-test/selftest-users/useraddbadtask.bb20
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb16
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb12
-rw-r--r--meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb12
-rw-r--r--meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend2
-rw-r--r--meta-selftest/recipes-test/testrpm/files/testfile.txt1
-rw-r--r--meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb18
-rw-r--r--meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb30
-rw-r--r--meta-selftest/recipes-test/wrapper/files/test.awk2
-rw-r--r--meta-selftest/wic/overlayfs_etc.wks.in4
-rw-r--r--meta-selftest/wic/test_efi_plugin.wks6
-rw-r--r--meta-selftest/wic/test_gpt_partition_name.wks7
-rw-r--r--meta-selftest/wic/test_rawcopy_plugin.wks.in2
-rw-r--r--meta-selftest/wic/test_uefikernel.wks5
97 files changed, 1405 insertions, 63 deletions
diff --git a/meta-selftest/classes/base-do-configure-modified.bbclass b/meta-selftest/classes/base-do-configure-modified.bbclass
new file mode 100644
index 0000000000..9175bb8ad9
--- /dev/null
+++ b/meta-selftest/classes/base-do-configure-modified.bbclass
@@ -0,0 +1,3 @@
1base_do_configure:append () {
2 echo "this changes base_do_configure() definiton "
3}
diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf
index 37570aa833..763ea011d4 100644
--- a/meta-selftest/conf/layer.conf
+++ b/meta-selftest/conf/layer.conf
@@ -9,4 +9,6 @@ BBFILE_COLLECTIONS += "selftest"
9BBFILE_PATTERN_selftest = "^${LAYERDIR}/" 9BBFILE_PATTERN_selftest = "^${LAYERDIR}/"
10BBFILE_PRIORITY_selftest = "5" 10BBFILE_PRIORITY_selftest = "5"
11 11
12LAYERSERIES_COMPAT_selftest = "gatesgarth" 12addpylib ${LAYERDIR}/lib oeqa
13
14LAYERSERIES_COMPAT_selftest = "styhead"
diff --git a/meta-selftest/conf/multiconfig/muslmc.conf b/meta-selftest/conf/multiconfig/muslmc.conf
new file mode 100644
index 0000000000..043cd1ccc3
--- /dev/null
+++ b/meta-selftest/conf/multiconfig/muslmc.conf
@@ -0,0 +1,2 @@
1TCLIBC = "musl"
2TMPDIR = "${TOPDIR}/tmp-mc-musl"
diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group
index b2e0e2f870..f7a66de24d 100644
--- a/meta-selftest/files/static-group
+++ b/meta-selftest/files/static-group
@@ -23,3 +23,7 @@ _apt:x:523:
23weston-launch:x:524: 23weston-launch:x:524:
24weston:x:525: 24weston:x:525:
25wayland:x:526: 25wayland:x:526:
26render:x:527:
27sgx:x:528:
28ptest:x:529:
29xuser:x:530:
diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd
index 2cfd0c9b42..cc6c5acd5c 100644
--- a/meta-selftest/files/static-passwd
+++ b/meta-selftest/files/static-passwd
@@ -17,3 +17,5 @@ bind:x:521:521::/:/bin/nologin
17builder:x:522:522::/:/bin/nologin 17builder:x:522:522::/:/bin/nologin
18_apt:x:523:523::/:/bin/nologin 18_apt:x:523:523::/:/bin/nologin
19weston:x:525:525::/:/bin/nologin 19weston:x:525:525::/:/bin/nologin
20ptest:x:529:529::/:/bin/nologin
21xuser:x:530:530::/:/bin/nologin
diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
index 64a3502370..d2f0f88f7d 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
@@ -10,7 +10,8 @@ class DnfSelftest(DnfTest):
10 import tempfile 10 import tempfile
11 cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-") 11 cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-")
12 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'), 12 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'),
13 cls.tc.target.server_ip) 13 '0.0.0.0', port=cls.tc.target.server_port,
14 logger=cls.tc.logger)
14 cls.repo_server.start() 15 cls.repo_server.start()
15 16
16 @classmethod 17 @classmethod
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
index 144decdd6b..f19cdee9f0 100644
--- a/meta-selftest/lib/oeqa/runtime/cases/virgl.py
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -15,4 +15,4 @@ class VirglTest(OERuntimeTestCase):
15 def test_kmscube(self): 15 def test_kmscube(self):
16 status, output = self.target.run('kmscube') 16 status, output = self.target.run('kmscube')
17 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output)) 17 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
18 self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output)) 18 self.assertIn('renderer: "virgl', output, "kmscube does not seem to use virgl:\n%s" %(output))
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
new file mode 100644
index 0000000000..73d4a8475f
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
@@ -0,0 +1,31 @@
1From 6fb10bd18488ed84776675bc1b2982800a51d839 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 6 Aug 2022 20:14:38 -0700
4Subject: [mtd-utils][PATCH] tests: Remove unused linux/fs.h header from includes
5
6This header is not needed, moreover it includes linux/mount.h which is
7now in conflict[1] with glibc provided sys/mount.h from glibc 2.36 onwards
8
9[1] https://sourceware.org/glibc/wiki/Release/2.36
10
11Upstream-Status: Submitted [https://lists.infradead.org/pipermail/linux-mtd/2022-August/094667.html]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 tests/fs-tests/lib/tests.c | 1 -
15 1 file changed, 1 deletion(-)
16
17diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
18index d1a2e0c..3db0426 100644
19--- a/tests/fs-tests/lib/tests.c
20+++ b/tests/fs-tests/lib/tests.c
21@@ -35,7 +35,6 @@
22 #include <sys/vfs.h>
23 #include <sys/mount.h>
24 #include <sys/statvfs.h>
25-#include <linux/fs.h>
26 #include <linux/jffs2.h>
27
28 #include "tests.h"
29--
302.37.1
31
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
new file mode 100644
index 0000000000..ca2141c972
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
@@ -0,0 +1,77 @@
1SUMMARY = "Tools for managing memory technology devices"
2HOMEPAGE = "http://www.linux-mtd.infradead.org/"
3DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices."
4SECTION = "base"
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
9inherit autotools pkgconfig update-alternatives
10
11DEPENDS = "zlib e2fsprogs util-linux"
12RDEPENDS:mtd-utils-tests += "bash"
13
14PV = "2.1.4"
15
16SRCREV = "c7f1bfa44a84d02061787e2f6093df5cc40b9f5c"
17SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
18 file://0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch \
19 "
20
21S = "${WORKDIR}/git"
22
23# xattr support creates an additional compile-time dependency on acl because
24# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
25# regardless whether acl is enabled or disabled in the distro should be okay.
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
27PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
28PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
29PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
30PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
31PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
32PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
33
34CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT"
35
36EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
37
38# Use higher priority than corresponding BusyBox-provided applets
39ALTERNATIVE_PRIORITY = "100"
40
41ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
42ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
43
44ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
45ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
46ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
47ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
48ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
49ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
50ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
51ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
52ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
53ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
54ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
55ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
56ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
57
58do_install () {
59 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
60}
61
62PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
63PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
64PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
65
66FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
67FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
68FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
69FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*"
70
71BBCLASSEXTEND = "native nativesdk"
72
73# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
74# git/.compr.c.dep:47: *** missing separator. Stop.
75PARALLEL_MAKE = ""
76
77EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-devtools/python/python-async-test.inc b/meta-selftest/recipes-devtools/python/python-async-test.inc
index c9602e8e52..a7dd1744f2 100644
--- a/meta-selftest/recipes-devtools/python/python-async-test.inc
+++ b/meta-selftest/recipes-devtools/python/python-async-test.inc
@@ -1,7 +1,7 @@
1SUMMARY = "Python framework to process interdependent tasks in a pool of workers" 1SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
2HOMEPAGE = "http://github.com/gitpython-developers/async" 2HOMEPAGE = "http://github.com/gitpython-developers/async"
3SECTION = "devel/python" 3SECTION = "devel/python"
4LICENSE = "BSD" 4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e" 5LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
6 6
7inherit pypi 7inherit pypi
@@ -11,6 +11,6 @@ PYPI_PACKAGE = "async"
11SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b" 11SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
12SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051" 12SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
13 13
14RDEPENDS_${PN} += "${PYTHON_PN}-threading" 14RDEPENDS:${PN} += "python3-threading"
15 15
16BBCLASSEXTEND = "nativesdk" 16BBCLASSEXTEND = "nativesdk"
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb
new file mode 100644
index 0000000000..47d878597a
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-bin_git.bb
@@ -0,0 +1,16 @@
1DESCRIPTION = "A simple example for C wrapper around a rust library"
2HOMEPAGE = "https://gitlab.com/fmartinsonsHome/rust-c-lib-example"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=cb9c441273ed8a029701a086befbfc63"
5
6SRC_URI = " \
7 git://gitlab.com/fmartinsonsHome/rust-c-lib-example.git;branch=main;protocol=https \
8"
9
10SRCREV = "fc53c457f69aa5221ec1f8619a007e8150db5e60"
11S = "${WORKDIR}/git"
12
13DEPENDS = "rust-c-lib-example"
14
15inherit meson pkgconfig
16
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc
new file mode 100644
index 0000000000..05f5949203
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example-crates.inc
@@ -0,0 +1,79 @@
1SRC_URI += " \
2 crate://crates.io/android-tzdata/0.1.1 \
3 crate://crates.io/android_system_properties/0.1.5 \
4 crate://crates.io/autocfg/1.1.0 \
5 crate://crates.io/bumpalo/3.13.0 \
6 crate://crates.io/cc/1.0.82 \
7 crate://crates.io/cfg-if/1.0.0 \
8 crate://crates.io/chrono/0.4.26 \
9 crate://crates.io/core-foundation-sys/0.8.4 \
10 crate://crates.io/iana-time-zone/0.1.57 \
11 crate://crates.io/iana-time-zone-haiku/0.1.2 \
12 crate://crates.io/js-sys/0.3.64 \
13 crate://crates.io/libc/0.2.147 \
14 crate://crates.io/log/0.4.19 \
15 crate://crates.io/num-traits/0.2.16 \
16 crate://crates.io/once_cell/1.18.0 \
17 crate://crates.io/proc-macro2/1.0.66 \
18 crate://crates.io/quote/1.0.32 \
19 crate://crates.io/syn/2.0.28 \
20 crate://crates.io/time/0.1.45 \
21 crate://crates.io/unicode-ident/1.0.11 \
22 crate://crates.io/wasi/0.10.0+wasi-snapshot-preview1 \
23 crate://crates.io/wasm-bindgen/0.2.87 \
24 crate://crates.io/wasm-bindgen-backend/0.2.87 \
25 crate://crates.io/wasm-bindgen-macro/0.2.87 \
26 crate://crates.io/wasm-bindgen-macro-support/0.2.87 \
27 crate://crates.io/wasm-bindgen-shared/0.2.87 \
28 crate://crates.io/winapi/0.3.9 \
29 crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
30 crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
31 crate://crates.io/windows/0.48.0 \
32 crate://crates.io/windows-targets/0.48.1 \
33 crate://crates.io/windows_aarch64_gnullvm/0.48.0 \
34 crate://crates.io/windows_aarch64_msvc/0.48.0 \
35 crate://crates.io/windows_i686_gnu/0.48.0 \
36 crate://crates.io/windows_i686_msvc/0.48.0 \
37 crate://crates.io/windows_x86_64_gnu/0.48.0 \
38 crate://crates.io/windows_x86_64_gnullvm/0.48.0 \
39 crate://crates.io/windows_x86_64_msvc/0.48.0 \
40"
41
42SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
43SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
44SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
45SRC_URI[bumpalo-3.13.0.sha256sum] = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
46SRC_URI[cc-1.0.82.sha256sum] = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
47SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
48SRC_URI[chrono-0.4.26.sha256sum] = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
49SRC_URI[core-foundation-sys-0.8.4.sha256sum] = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
50SRC_URI[iana-time-zone-0.1.57.sha256sum] = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
51SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
52SRC_URI[js-sys-0.3.64.sha256sum] = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
53SRC_URI[libc-0.2.147.sha256sum] = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
54SRC_URI[log-0.4.19.sha256sum] = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
55SRC_URI[num-traits-0.2.16.sha256sum] = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
56SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
57SRC_URI[proc-macro2-1.0.66.sha256sum] = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
58SRC_URI[quote-1.0.32.sha256sum] = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
59SRC_URI[syn-2.0.28.sha256sum] = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
60SRC_URI[time-0.1.45.sha256sum] = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
61SRC_URI[unicode-ident-1.0.11.sha256sum] = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
62SRC_URI[wasi-0.10.0+wasi-snapshot-preview1.sha256sum] = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
63SRC_URI[wasm-bindgen-0.2.87.sha256sum] = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
64SRC_URI[wasm-bindgen-backend-0.2.87.sha256sum] = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
65SRC_URI[wasm-bindgen-macro-0.2.87.sha256sum] = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
66SRC_URI[wasm-bindgen-macro-support-0.2.87.sha256sum] = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
67SRC_URI[wasm-bindgen-shared-0.2.87.sha256sum] = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
68SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
69SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
70SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
71SRC_URI[windows-0.48.0.sha256sum] = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
72SRC_URI[windows-targets-0.48.1.sha256sum] = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
73SRC_URI[windows_aarch64_gnullvm-0.48.0.sha256sum] = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
74SRC_URI[windows_aarch64_msvc-0.48.0.sha256sum] = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
75SRC_URI[windows_i686_gnu-0.48.0.sha256sum] = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
76SRC_URI[windows_i686_msvc-0.48.0.sha256sum] = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
77SRC_URI[windows_x86_64_gnu-0.48.0.sha256sum] = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
78SRC_URI[windows_x86_64_gnullvm-0.48.0.sha256sum] = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
79SRC_URI[windows_x86_64_msvc-0.48.0.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
diff --git a/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb b/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
new file mode 100644
index 0000000000..6e7c250b92
--- /dev/null
+++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "A simple example for rust C library"
2HOMEPAGE = "https://gitlab.com/fmartinsonsHome/rust-c-lib-example"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=cb9c441273ed8a029701a086befbfc63"
5
6SRC_URI = " \
7 git://gitlab.com/fmartinsonsHome/rust-c-lib-example.git;branch=main;protocol=https \
8"
9
10SRCREV = "fc53c457f69aa5221ec1f8619a007e8150db5e60"
11S = "${WORKDIR}/git"
12
13inherit cargo_c
14
15require ${BPN}-crates.inc
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc
new file mode 100644
index 0000000000..9646482b28
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs-crates.inc
@@ -0,0 +1,8 @@
1# Autogenerated with 'bitbake -c update_crates hello-rs'
2
3# from Cargo.lock
4SRC_URI += " \
5 crate://crates.io/figlet-rs/0.1.5 \
6"
7
8SRC_URI[figlet-rs-0.1.5.sha256sum] = "4742a071cd9694fc86f9fa1a08fa3e53d40cc899d7ee532295da2d085639fbc5"
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch
new file mode 100644
index 0000000000..7569ccef7b
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs/0001-Greet-OE-Core.patch
@@ -0,0 +1,24 @@
1From 3aea1ece0ca6ac0bf0ffe42736827af22966f767 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alexk@zuma.ai>
3Date: Wed, 27 Dec 2023 09:55:48 +0000
4Subject: [PATCH] Greet "OE-Core"
5
6Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
7Upstream-Status: Inappropriate
8---
9 src/main.rs | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/src/main.rs b/src/main.rs
13index f4a310758b19..224eca65c38d 100644
14--- a/src/main.rs
15+++ b/src/main.rs
16@@ -3,7 +3,7 @@ use hello_lib::greet;
17
18 fn main() {
19 let standard_font = FIGfont::standard().unwrap();
20- let greeting = greet(None);
21+ let greeting = greet(Some("OE-Core"));
22 let figure = standard_font.convert(&greeting);
23 println!("{}", figure.unwrap());
24 }
diff --git a/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
new file mode 100644
index 0000000000..9a136f2978
--- /dev/null
+++ b/meta-selftest/recipes-extended/hello-rs/hello-rs_0.1.0.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Simple hello world example"
2HOMEPAGE = "https://github.com/akiernan/hello-bin"
3LICENSE = "Unlicense"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7246f848faa4e9c9fc0ea91122d6e680"
5
6SRC_URI = "git://github.com/akiernan/hello-bin.git;protocol=https;branch=main;subpath=rust \
7 file://0001-Greet-OE-Core.patch \
8 git://github.com/akiernan/hello-lib.git;protocol=https;branch=main;name=hello-lib;destsuffix=hello-lib;type=git-dependency \
9 "
10SRCREV = "d3d096eda182644868f8e7458dcfa538ff637db3"
11
12SRCREV_FORMAT .= "_hello-lib"
13SRCREV_hello-lib = "59c84574e844617043cf337bc8fa537cf87ad8ae"
14
15S = "${WORKDIR}/rust"
16
17inherit cargo cargo-update-recipe-crates ptest-cargo
18
19# Remove this when the recipe is reproducible
20EXCLUDE_FROM_WORLD = "1"
21
22require ${BPN}-crates.inc
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch
new file mode 100644
index 0000000000..e564958dad
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0055-Add-cstdint-for-uintXX_t-types.patch
@@ -0,0 +1,38 @@
1From 3d076ea588eb3c7f334133b4c31172a14beadf5b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 2 Feb 2023 20:18:27 -0800
4Subject: [PATCH] Add <cstdint> for uintXX_t types
5
6gcc 13 moved some includes around and as a result <cstdint> is no
7longer transitively included [1]. Explicitly include it
8for uintXX_t.
9
10[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
11
12Upstream-Status: Submitted [https://github.com/falcosecurity/libs/pull/862]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 userspace/libsinsp/filter/parser.h | 1 +
16 userspace/libsinsp/filter_value.h | 1 +
17 2 files changed, 2 insertions(+)
18
19--- a/userspace/libsinsp/filter/parser.h
20+++ b/userspace/libsinsp/filter/parser.h
21@@ -18,6 +18,7 @@ limitations under the License.
22 #pragma once
23
24 #include "ast.h"
25+#include <cstdint>
26
27 //
28 // Context-free Grammar for Sinsp Filters
29--- a/userspace/libsinsp/filter_value.h
30+++ b/userspace/libsinsp/filter_value.h
31@@ -18,6 +18,7 @@ limitations under the License.
32 #pragma once
33
34 #include <string.h>
35+#include <cstdint>
36 #include <utility>
37
38 // Used for CO_IN/CO_PMATCH filterchecks using PT_CHARBUFs to allow
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch
new file mode 100644
index 0000000000..903ccdf36a
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest/0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch
@@ -0,0 +1,29 @@
1From ed8969a233adb6bf701de96d0fd0570e5ddcc787 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 21 Mar 2022 19:35:48 -0700
4Subject: [PATCH] cmake: Pass PROBE_NAME via CFLAGS
5
6This helps compliation of driver code where its calling modprobe on the
7given kernel module via system() API
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 CMakeLists.txt | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 7dceb7ae..e156c36f 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -149,6 +149,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
20 if(NOT DEFINED PROBE_NAME)
21 set(PROBE_NAME "scap")
22 endif()
23+ add_definitions(-DPROBE_NAME="${PROBE_NAME}")
24
25 set(DRIVERS_REPO "https://download.sysdig.com/scap-drivers")
26
27--
282.35.1
29
diff --git a/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb
new file mode 100644
index 0000000000..2ce85fe451
--- /dev/null
+++ b/meta-selftest/recipes-extended/sysdig/sysdig-selftest_0.28.0.bb
@@ -0,0 +1,66 @@
1SUMMARY = "A New System Troubleshooting Tool Built for the Way You Work"
2DESCRIPTION = "Sysdig is open source, system-level exploration: capture \
3system state and activity from a running Linux instance, then save, \
4filter and analyze."
5HOMEPAGE = "http://www.sysdig.org/"
6LICENSE = "Apache-2.0 & (MIT | GPL-2.0-only)"
7LIC_FILES_CHKSUM = "file://COPYING;md5=f8fee3d59797546cffab04f3b88b2d44"
8
9inherit cmake pkgconfig
10
11#OECMAKE_GENERATOR = "Unix Makefiles"
12JIT ?= "jit"
13JIT:mipsarchn32 = ""
14JIT:mipsarchn64 = ""
15JIT:riscv64 = ""
16JIT:riscv32 = ""
17JIT:powerpc = ""
18JIT:powerpc64le = ""
19JIT:powerpc64 = ""
20
21#DEPENDS += "libb64 lua${JIT} zlib c-ares grpc-native grpc curl ncurses jsoncpp \
22# tbb jq openssl elfutils protobuf protobuf-native jq-native valijson"
23RDEPENDS:${PN} = "bash"
24
25SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \
26 git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=git/falcosecurity-libs \
27 file://0055-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
28 file://0099-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
29 "
30SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b"
31SRCREV_falco= "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
32
33SRCREV_FORMAT = "sysdig_falco"
34
35S = "${WORKDIR}/git"
36
37EXTRA_OECMAKE = "\
38 -DBUILD_DRIVER=OFF \
39 -DMINIMAL_BUILD=ON \
40 -DUSE_BUNDLED_DEPS=OFF \
41 -DCREATE_TEST_TARGETS=OFF \
42 -DDIR_ETC=${sysconfdir} \
43 -DLUA_INCLUDE_DIR=${STAGING_INCDIR}/luajit-2.1 \
44 -DFALCOSECURITY_LIBS_SOURCE_DIR=${S}/falcosecurity-libs \
45 -DVALIJSON_INCLUDE=${STAGING_INCDIR}/valijson \
46"
47
48#CMAKE_VERBOSE = "VERBOSE=1"
49
50FILES:${PN} += " \
51 ${DIR_ETC}/* \
52 ${datadir}/zsh/* \
53 ${prefix}/src/* \
54"
55# Use getaddrinfo_a is a GNU extension in libsinsp
56# It should be fixed in sysdig, until then disable
57# on musl
58# Something like this https://code.videolan.org/ePirat/vlc/-/commit/01fd9fe4c7f6c5558f7345f38abf0152e17853ab is needed to fix it
59COMPATIBLE_HOST:libc-musl = "null"
60COMPATIBLE_HOST:mips = "null"
61COMPATIBLE_HOST:riscv64 = "null"
62COMPATIBLE_HOST:riscv32 = "null"
63COMPATIBLE_HOST:powerpc = "null"
64COMPATIBLE_HOST:powerpc64le = "null"
65
66EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend b/meta-selftest/recipes-test/aspell/aspell_%.bbappend
index 205720982c..205720982c 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend
+++ b/meta-selftest/recipes-test/aspell/aspell_%.bbappend
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
index 9f905a5198..e1e473fe80 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
+++ b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
@@ -4,8 +4,9 @@
4 4
5SUMMARY = "GNU Aspell spell-checker" 5SUMMARY = "GNU Aspell spell-checker"
6SECTION = "console/utils" 6SECTION = "console/utils"
7HOMEPAGE = "https://ftp.gnu.org/gnu/aspell/"
7 8
8LICENSE = "LGPLv2 | LGPLv2.1" 9LICENSE = "LGPL-2.0-only | LGPL-2.1-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" 10LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
10 11
11SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" 12SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz"
@@ -19,15 +20,15 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
19 20
20PACKAGES += "libaspell libpspell libpspell-dev aspell-utils" 21PACKAGES += "libaspell libpspell libpspell-dev aspell-utils"
21 22
22FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*" 23FILES:${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
23FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*" 24FILES:libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
24FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*" 25FILES:aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
25FILES_${PN} = "${bindir}/aspell" 26FILES:${PN} = "${bindir}/aspell"
26FILES_libpspell = "${libdir}/libpspell.so.*" 27FILES:libpspell = "${libdir}/libpspell.so.*"
27FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" 28FILES:libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell"
28 29
29ARM_INSTRUCTION_SET_armv4 = "arm" 30ARM_INSTRUCTION_SET:armv4 = "arm"
30ARM_INSTRUCTION_SET_armv5 = "arm" 31ARM_INSTRUCTION_SET:armv5 = "arm"
31ARM_INSTRUCTION_SET_armv6 = "arm" 32ARM_INSTRUCTION_SET:armv6 = "arm"
32 33
33inherit autotools gettext 34inherit autotools gettext
diff --git a/meta-selftest/recipes-test/base-files/base-files_%.bbappend b/meta-selftest/recipes-test/base-files/base-files_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/base-files/base-files_%.bbappend
@@ -0,0 +1,2 @@
1# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
2include test_recipe.inc
diff --git a/meta-selftest/recipes-test/binutils/binutils_%.bbappend b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/binutils/binutils_%.bbappend
@@ -0,0 +1,2 @@
1# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
2include test_recipe.inc
diff --git a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
index f8dd2290b3..929bc29753 100644
--- a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
+++ b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
@@ -2,7 +2,7 @@ LICENSE = "MIT"
2 2
3INHIBIT_DEFAULT_DEPS = "1" 3INHIBIT_DEFAULT_DEPS = "1"
4 4
5do_install_append() { 5do_install:append() {
6 install -d ${D}${bindir} 6 install -d ${D}${bindir}
7 touch ${D}${bindir}/theapp 7 touch ${D}${bindir}/theapp
8} 8}
diff --git a/meta-selftest/recipes-test/cpp/.gitignore b/meta-selftest/recipes-test/cpp/.gitignore
new file mode 100644
index 0000000000..30d388a12b
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/.gitignore
@@ -0,0 +1 @@
build* \ No newline at end of file
diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb b/meta-selftest/recipes-test/cpp/cmake-example.bb
new file mode 100644
index 0000000000..aecfcf780a
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example.bb
@@ -0,0 +1,25 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7SUMMARY = "A C++ example compiled with cmake."
8
9require cpp-example.inc
10
11SRC_URI += "file://CMakeLists.txt"
12
13inherit cmake-qemu
14
15PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON"
16
17FILES:${PN}-ptest += "${bindir}/test-cmake-example"
18
19do_run_tests () {
20 bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
21 eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD}
22}
23do_run_tests[doc] = "Run cmake --target=test using qemu-user"
24
25addtask do_run_tests after do_compile
diff --git a/meta-selftest/recipes-test/cpp/cmake-example/run-ptest b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
new file mode 100644
index 0000000000..94b620a198
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2#
3# Copyright OpenEmbedded Contributors
4#
5# SPDX-License-Identifier: MIT
6#
7
8test-cmake-example
9
10# Note: run-ptests exits with exit value from test-cmake-example
diff --git a/meta-selftest/recipes-test/cpp/cpp-example.inc b/meta-selftest/recipes-test/cpp/cpp-example.inc
new file mode 100644
index 0000000000..ad374be9d0
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/cpp-example.inc
@@ -0,0 +1,24 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
9
10DEPENDS += "json-c"
11
12PV = "1.0"
13
14SRC_URI = "\
15 file://cpp-example.cpp \
16 file://cpp-example-lib.hpp \
17 file://cpp-example-lib.cpp \
18 file://test-cpp-example.cpp \
19 file://run-ptest \
20"
21
22S = "${WORKDIR}"
23
24inherit ptest
diff --git a/meta-selftest/recipes-test/cpp/files/CMakeLists.txt b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
new file mode 100644
index 0000000000..6fa6917d89
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt
@@ -0,0 +1,61 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7cmake_minimum_required(VERSION 3.22)
8
9project(cmake-example
10 VERSION 1.0.0
11 LANGUAGES CXX
12)
13
14option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
15option(FAILING_TEST "Compile a failing unit test to test the test infrastructure" OFF)
16
17set(CMAKE_CXX_STANDARD 17)
18set(CMAKE_CXX_STANDARD_REQUIRED On)
19set(CMAKE_CXX_EXTENSIONS Off)
20
21include(GNUInstallDirs)
22
23# Linking a small library makes the example more useful for testing.
24find_package(json-c)
25
26# A simple library linking json-c library found by pkgconfig
27add_library(cmake-example-lib cpp-example-lib.cpp cpp-example-lib.hpp)
28set_target_properties(cmake-example-lib PROPERTIES
29 VERSION ${PROJECT_VERSION}
30 SOVERSION ${PROJECT_VERSION_MAJOR}
31)
32target_link_libraries(cmake-example-lib PRIVATE json-c::json-c)
33
34install(TARGETS cmake-example-lib
35 INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
36 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
37 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
38)
39
40# A simple executable linking the library
41add_executable(cmake-example cpp-example.cpp)
42target_link_libraries(cmake-example PRIVATE cmake-example-lib)
43
44install(TARGETS cmake-example
45 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
46)
47
48# A simple test executable for testing the library
49add_executable(test-cmake-example test-cpp-example.cpp)
50target_link_libraries(test-cmake-example PRIVATE cmake-example-lib)
51
52if (FAILING_TEST)
53 target_compile_definitions(test-cmake-example PRIVATE FAIL_COMPARISON_STR="foo")
54endif(FAILING_TEST)
55
56install(TARGETS test-cmake-example
57 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
58)
59
60include(CTest)
61add_test(NAME test-cmake-example COMMAND test-cmake-example)
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
new file mode 100644
index 0000000000..d3dc976864
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
@@ -0,0 +1,33 @@
1/*
2 * Copyright OpenEmbedded Contributors
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#include <iostream>
8#include <string>
9#include <json-c/json.h>
10#include "cpp-example-lib.hpp"
11
12const std::string &CppExample::get_string()
13{
14 return test_string;
15}
16
17const char *CppExample::get_json_c_version()
18{
19 return json_c_version();
20}
21
22void CppExample::print_json()
23{
24 struct json_object *jobj;
25 const int flag = JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY;
26
27 jobj = json_object_new_object();
28 json_object_object_add(jobj, "test_string", json_object_new_string(test_string.c_str()));
29
30 std::cout << json_object_to_json_string_ext(jobj, flag) << std::endl;
31
32 json_object_put(jobj); // Delete the json object
33}
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
new file mode 100644
index 0000000000..0ad9e7b7b2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp
@@ -0,0 +1,21 @@
1/*
2 * Copyright OpenEmbedded Contributors
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#pragma once
8
9#include <string>
10
11struct CppExample
12{
13 inline static const std::string test_string = "cpp-example-lib Magic: 123456789";
14
15 /* Retrieve a constant string */
16 const std::string &get_string();
17 /* Retrieve a constant string from a library */
18 const char *get_json_c_version();
19 /* Call a more advanced function from a library */
20 void print_json();
21};
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp
new file mode 100644
index 0000000000..9889554e0c
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp
@@ -0,0 +1,18 @@
1/*
2 * Copyright OpenEmbedded Contributors
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#include "cpp-example-lib.hpp"
8
9#include <iostream>
10
11int main()
12{
13 auto cpp_example = CppExample();
14 std::cout << "C++ example linking " << cpp_example.get_string() << std::endl;
15 std::cout << "Linking json-c version " << cpp_example.get_json_c_version() << std::endl;
16 cpp_example.print_json();
17 return 0;
18}
diff --git a/meta-selftest/recipes-test/cpp/files/meson.build b/meta-selftest/recipes-test/cpp/files/meson.build
new file mode 100644
index 0000000000..0e2b55f3a2
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/meson.build
@@ -0,0 +1,38 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7project('meson-example', 'cpp',
8 version: '1.0.0',
9 default_options: ['cpp_std=c++17']
10 )
11
12jsoncdep = dependency('json-c')
13
14if get_option('FAILING_TEST').enabled()
15 add_project_arguments('-DFAIL_COMPARISON_STR=foo', language: 'cpp')
16endif
17
18mesonexlib = shared_library('mesonexlib',
19 'cpp-example-lib.cpp', 'cpp-example-lib.hpp',
20 version: meson.project_version(),
21 soversion: meson.project_version().split('.')[0],
22 dependencies : jsoncdep,
23 install : true
24 )
25
26executable('mesonex',
27 'cpp-example.cpp',
28 link_with : mesonexlib,
29 install : true
30 )
31
32test_mesonex = executable('test-mesonex',
33 'test-cpp-example.cpp',
34 link_with : mesonexlib,
35 install : true
36)
37
38test('meson example test', test_mesonex)
diff --git a/meta-selftest/recipes-test/cpp/files/meson.options b/meta-selftest/recipes-test/cpp/files/meson.options
new file mode 100644
index 0000000000..58a0bf9e61
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/meson.options
@@ -0,0 +1,3 @@
1
2option('FAILING_TEST', type : 'feature', value : 'disabled',
3 description : 'Compile a failing unit test to test the test infrastructure')
diff --git a/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp
new file mode 100644
index 0000000000..83c9bfa844
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp
@@ -0,0 +1,25 @@
1/*
2* Copyright OpenEmbedded Contributors
3*
4* SPDX-License-Identifier: MIT
5*/
6
7#include "cpp-example-lib.hpp"
8
9#include <iostream>
10
11/* This is for creating a failing test for testing the test infrastructure */
12#ifndef FAIL_COMPARISON_STR
13#define FAIL_COMPARISON_STR ""
14#endif
15
16int main() {
17 auto cpp_example = CppExample();
18 auto ret_string = cpp_example.get_string();
19 if(0 == ret_string.compare(CppExample::test_string + FAIL_COMPARISON_STR)) {
20 std::cout << "PASS: " << ret_string << " = " << CppExample::test_string << std::endl;
21 } else {
22 std::cout << "FAIL: " << ret_string << " != " << CppExample::test_string << std::endl;
23 return 1;
24 }
25}
diff --git a/meta-selftest/recipes-test/cpp/meson-example.bb b/meta-selftest/recipes-test/cpp/meson-example.bb
new file mode 100644
index 0000000000..14a7ca8dc9
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/meson-example.bb
@@ -0,0 +1,27 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7SUMMARY = "A C++ example compiled with meson."
8
9require cpp-example.inc
10
11SRC_URI += "\
12 file://meson.build \
13 file://meson.options \
14"
15
16inherit pkgconfig meson
17
18PACKAGECONFIG[failing_test] = "-DFAILING_TEST=enabled"
19
20FILES:${PN}-ptest += "${bindir}/test-mesonex"
21
22do_run_tests () {
23 meson test -C "${B}" --no-rebuild
24}
25do_run_tests[doc] = "Run meson test using qemu-user"
26
27addtask do_run_tests after do_compile
diff --git a/meta-selftest/recipes-test/cpp/meson-example/run-ptest b/meta-selftest/recipes-test/cpp/meson-example/run-ptest
new file mode 100644
index 0000000000..b1804f0096
--- /dev/null
+++ b/meta-selftest/recipes-test/cpp/meson-example/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2#
3# Copyright OpenEmbedded Contributors
4#
5# SPDX-License-Identifier: MIT
6#
7
8test-mesonex
9
10# Note: run-ptests exits with exit value from test-mesonex
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
index d36c9edee4..f12bee0b3d 100644
--- a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb
@@ -4,5 +4,5 @@ INHIBIT_DEFAULT_DEPS = "1"
4EXCLUDE_FROM_WORLD = "1" 4EXCLUDE_FROM_WORLD = "1"
5 5
6SRC_URI = "file://source;subdir=${BP}" 6SRC_URI = "file://source;subdir=${BP}"
7SRC_URI_append_qemuarm = " file://arm.patch;striplevel=0" 7SRC_URI:append:qemuarm = " file://arm.patch;striplevel=0"
8SRC_URI_append_qemux86 = " file://x86.patch;striplevel=0" 8SRC_URI:append:qemux86 = " file://x86.patch;striplevel=0"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file3 b/meta-selftest/recipes-test/devtool/devtool-test-local/file3
new file mode 100644
index 0000000000..0f30e9eec4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file3
@@ -0,0 +1 @@
The third file.
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
index 6bfc557060..d0fd697978 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb
@@ -1,4 +1,4 @@
1LICENSE = "GPLv2+" 1LICENSE = "GPL-2.0-or-later"
2LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" 2LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
3 3
4INHIBIT_DEFAULT_DEPS = "1" 4INHIBIT_DEFAULT_DEPS = "1"
@@ -7,9 +7,12 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.x
7 file://file1 \ 7 file://file1 \
8 file://file2" 8 file://file2"
9 9
10SRC_URI:append:class-native = " file://file3"
11
10SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" 12SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
11SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" 13SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
12 14
13S = "${WORKDIR}/syslinux-${PV}" 15S = "${WORKDIR}/syslinux-${PV}"
14 16
15EXCLUDE_FROM_WORLD = "1" 17EXCLUDE_FROM_WORLD = "1"
18BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
index 3f7123cda0..e767619879 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb
@@ -4,4 +4,7 @@ INHIBIT_DEFAULT_DEPS = "1"
4SRC_URI = "file://file1 \ 4SRC_URI = "file://file1 \
5 file://file2" 5 file://file2"
6 6
7SRC_URI:append:class-native = " file://file3"
8
7EXCLUDE_FROM_WORLD = "1" 9EXCLUDE_FROM_WORLD = "1"
10BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3
new file mode 100644
index 0000000000..0f30e9eec4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3
@@ -0,0 +1 @@
The third file.
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
index fc3799590c..e25b3d9747 100644
--- a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb
@@ -1,4 +1,4 @@
1LICENSE = "GPLv2+" 1LICENSE = "GPL-2.0-or-later"
2LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 2LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
3 3
4DEPENDS = "libxres libxext virtual/libx11 ncurses" 4DEPENDS = "libxres libxext virtual/libx11 ncurses"
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
index 07b83276fb..2558a22ce5 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
@@ -1,17 +1,17 @@
1SUMMARY = "A simple tool to wait for a specific signal over DBus" 1SUMMARY = "A simple tool to wait for a specific signal over DBus"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" 2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
3SECTION = "base" 3SECTION = "base"
4LICENSE = "GPLv2" 4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6 6
7DEPENDS = "dbus" 7DEPENDS = "dbus"
8 8
9# Note: this is intentionally not the latest version in the original .bb 9# Note: this is intentionally not the latest version in the original .bb
10SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717" 10SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717"
11PV = "0.1+git${SRCPV}" 11PV = "0.1+git"
12PR = "r2" 12PR = "r2"
13 13
14SRC_URI = "git://git.yoctoproject.org/dbus-wait" 14SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master"
15UPSTREAM_CHECK_COMMITS = "1" 15UPSTREAM_CHECK_COMMITS = "1"
16RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" 16RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
17 17
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
index 32ec4b14fa..eaa8bd898d 100644
--- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
@@ -1,16 +1,16 @@
1SUMMARY = "A simple tool to wait for a specific signal over DBus" 1SUMMARY = "A simple tool to wait for a specific signal over DBus"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" 2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
3SECTION = "base" 3SECTION = "base"
4LICENSE = "GPLv2" 4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 5LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
6 6
7DEPENDS = "dbus" 7DEPENDS = "dbus"
8 8
9# Note: this is intentionally not the latest version in the original .bb 9# Note: this is intentionally not the latest version in the original .bb
10SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517" 10SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517"
11PV = "0.1+git${SRCPV}" 11PV = "0.1+git"
12 12
13SRC_URI = "git://git.yoctoproject.org/dbus-wait" 13SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master"
14UPSTREAM_CHECK_COMMITS = "1" 14UPSTREAM_CHECK_COMMITS = "1"
15RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" 15RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
16 16
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb
new file mode 100644
index 0000000000..69c0d351ec
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb
@@ -0,0 +1,16 @@
1SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
2LICENSE = "Artistic-2.0"
3LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
4
5SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
6UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
7RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
8
9SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
10
11S = "${WORKDIR}/pv-${PV}"
12
13EXCLUDE_FROM_WORLD = "1"
14
15inherit autotools
16
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded
new file mode 100644
index 0000000000..3ce7e85e10
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded
@@ -0,0 +1,15 @@
1SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
2LICENSE = "Artistic-2.0"
3LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
4
5SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
6SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
7UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
8RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
9
10S = "${WORKDIR}/pv-${PV}"
11
12EXCLUDE_FROM_WORLD = "1"
13
14inherit autotools
15
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb
new file mode 100644
index 0000000000..9abf80e6ed
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
2LICENSE = "Artistic-2.0"
3LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
4
5SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
6UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
7RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
8
9SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
10SRC_URI[sha1sum] = "63a0801350e812541c7f8e9ad74e0d6b629d0b39"
11SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc"
12SRC_URI[sha384sum] = "5fff6390465ff23dbf573fcf39dfad3aed2f92074a35e6c02abe58b7678858d90fa6572ff4cb56df8b3e217c739cdbe3"
13SRC_URI[sha512sum] = "32efe7071a363f547afc74e96774f711795edda1d2702823a347d0f9953e859b7d8c45b3e63e18ffb9e0d5ed5910be652d7d727c8676e81b6cb3aed0b13aec00"
14
15PR = "r5"
16
17S = "${WORKDIR}/pv-${PV}"
18
19EXCLUDE_FROM_WORLD = "1"
20
21inherit autotools
22
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded
new file mode 100644
index 0000000000..cd2a0842f4
--- /dev/null
+++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded
@@ -0,0 +1,19 @@
1SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
2LICENSE = "Artistic-2.0"
3LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
4
5SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz"
6UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
7RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature"
8
9SRC_URI[sha1sum] = "395ce62f4f3e035b86c77038f04b96c5aa233595"
10SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
11SRC_URI[sha384sum] = "218c8d2d097aeba5310be759bc20573f18ffa0b11701eac6dd2e7e14ddf13c6e0e094ca7ca026eaa05ef92a056402e36"
12SRC_URI[sha512sum] = "1cf9d7376fceefcd594d0a8b591afc8e11ce89f7210d10ad74438974ecebe9cc5d9ec4db9cc79e0566bfd2b0278c0cc263c07547803e7536432cd1ffd32d8a45"
13
14S = "${WORKDIR}/pv-${PV}"
15
16EXCLUDE_FROM_WORLD = "1"
17
18inherit autotools
19
diff --git a/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend
@@ -0,0 +1,2 @@
1# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
2include test_recipe.inc
diff --git a/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb
index 08089b4186..90d9b66b2c 100644
--- a/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb
+++ b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb
@@ -1,8 +1,26 @@
1SUMMARY = "Test recipe for fetching git submodules" 1SUMMARY = "Test recipe for fetching git submodules"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/"
2LICENSE = "MIT" 3LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4 5
5INHIBIT_DEFAULT_DEPS = "1" 6INHIBIT_DEFAULT_DEPS = "1"
6 7
7SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test" 8UPSTREAM_VERSION_UNKNOWN = "1"
9
10SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master"
8SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" 11SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee"
12
13S = "${WORKDIR}/git"
14
15do_test_git_as_user() {
16 cd ${S}
17 git status
18}
19addtask test_git_as_user after do_unpack
20
21fakeroot do_test_git_as_root() {
22 cd ${S}
23 git status
24}
25do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot"
26addtask test_git_as_root after do_unpack
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
new file mode 100644
index 0000000000..f1b6c55833
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb
@@ -0,0 +1,16 @@
1SUMMARY = "Test recipe for git repo initialization"
2HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2"
3LICENSE = "GPL-2.0-or-later"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8PATCHTOOL="git"
9
10SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \
11 file://0001-testpatch.patch \
12 "
13
14SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
15
16S = "${WORKDIR}/git"
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
new file mode 100644
index 0000000000..bccda17ee9
--- /dev/null
+++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch
@@ -0,0 +1,9 @@
1diff --git a/Makefile.am b/Makefile.am
2index 432a9b4..bbf7c74 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -1,3 +1,4 @@
6+## This is useless comment to test if patch works
7 ACLOCAL_AMFLAGS = -I m4
8
9 SUBDIRS = matchbox-panel applets data po
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb
new file mode 100644
index 0000000000..5146129666
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb
@@ -0,0 +1,4 @@
1require gitunpackoffline.inc
2
3# Clear the base.bbclass magic srcrev call
4fetcher_hashes_dummyfunc[vardepvalue] = ""
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb
new file mode 100644
index 0000000000..d9a54690b2
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb
@@ -0,0 +1,5 @@
1require gitunpackoffline.inc
2
3TAGVALUE = "2.11"
4
5PV = "0.0+git"
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc
new file mode 100644
index 0000000000..602e895199
--- /dev/null
+++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc
@@ -0,0 +1,16 @@
1SUMMARY = "Test recipe for fetching git submodules"
2HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2"
3LICENSE = "GPL-2.0-or-later"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8TAGVALUE = "2.10"
9
10# Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again.
11SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https"
12SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}"
13SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7"
14SRCREV:gitunpack-enable-recipe = ""
15
16S = "${WORKDIR}/git"
diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index 5d4d10eef6..317a0712aa 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,7 @@
1SUMMARY = "An image used during oe-selftest tests" 1SUMMARY = "An image used during oe-selftest tests"
2 2
3IMAGE_INSTALL = "packagegroup-core-boot dropbear" 3# libudev is needed for deploy mdadm via devtool
4IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-dropbear libudev"
4IMAGE_FEATURES = "debug-tweaks" 5IMAGE_FEATURES = "debug-tweaks"
5 6
6IMAGE_LINGUAS = " " 7IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 1cb019898d..84d3721885 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -7,9 +7,9 @@ IMAGE_INSTALL = "packagegroup-core-boot"
7IMAGE_FSTYPES = "wic" 7IMAGE_FSTYPES = "wic"
8 8
9WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native" 9WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native"
10WKS_FILE_DEPENDS_append_x86 = " syslinux-native syslinux" 10WKS_FILE_DEPENDS:append:x86 = " syslinux-native syslinux"
11WKS_FILE_DEPENDS_append_x86-64 = " syslinux-native syslinux" 11WKS_FILE_DEPENDS:append:x86-64 = " syslinux-native syslinux"
12WKS_FILE_DEPENDS_append_x86-x32 = " syslinux-native syslinux" 12WKS_FILE_DEPENDS:append:x86-x32 = " syslinux-native syslinux"
13 13
14LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 14LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
15 15
diff --git a/meta-selftest/recipes-test/license/incompatible-license-alias.bb b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
index e0b4e13c26..1af99e7809 100644
--- a/meta-selftest/recipes-test/license/incompatible-license-alias.bb
+++ b/meta-selftest/recipes-test/license/incompatible-license-alias.bb
@@ -1,3 +1,5 @@
1SUMMARY = "Recipe with an alias of an SPDX license" 1SUMMARY = "Recipe with an alias of an SPDX license"
2DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing" 2DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing"
3LICENSE = "GPLv3" 3LICENSE = "GPLv3"
4
5EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb
index 282f5c2875..6fdc58fd30 100644
--- a/meta-selftest/recipes-test/license/incompatible-license.bb
+++ b/meta-selftest/recipes-test/license/incompatible-license.bb
@@ -1,3 +1,5 @@
1SUMMARY = "Recipe with an SPDX license" 1SUMMARY = "Recipe with an SPDX license"
2DESCRIPTION = "Is licensed with an SPDX license to be used for testing" 2DESCRIPTION = "Is licensed with an SPDX license to be used for testing"
3LICENSE = "GPL-3.0-only" 3LICENSE = "GPL-3.0-only"
4
5EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb
index ab3b58d2c9..47bd8d7c00 100644
--- a/meta-selftest/recipes-test/license/incompatible-licenses.bb
+++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb
@@ -1,3 +1,5 @@
1SUMMARY = "Recipe with multiple SPDX licenses" 1SUMMARY = "Recipe with multiple SPDX licenses"
2DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" 2DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing"
3LICENSE = "GPL-2.0-only & GPL-3.0 & LGPL-3.0-only" 3LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-3.0-only"
4
5EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
index 35af0966ef..142d73158e 100644
--- a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
+++ b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb
@@ -1,3 +1,5 @@
1SUMMARY = "Recipe with a non-SPDX license" 1SUMMARY = "Recipe with a non-SPDX license"
2DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing" 2DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing"
3LICENSE = "FooLicense" 3LICENSE = "FooLicense"
4
5EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/logging-test/logging-test.bb b/meta-selftest/recipes-test/logging-test/logging-test.bb
new file mode 100644
index 0000000000..ac3fb46f45
--- /dev/null
+++ b/meta-selftest/recipes-test/logging-test/logging-test.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Destined to fail"
2LICENSE = "CLOSED"
3
4deltask do_patch
5INHIBIT_DEFAULT_DEPS = "1"
6
7do_shelltest() {
8 echo "This is shell stdout"
9 echo "This is shell stderr" >&2
10 exit 1
11}
12addtask do_shelltest
13
14python do_pythontest_exec_func_shell() {
15 bb.build.exec_func('do_shelltest', d)
16}
17addtask do_pythontest_exec_func_shell
18
19python do_pythontest_exit () {
20 print("This is python stdout")
21 sys.exit(1)
22}
23addtask do_pythontest_exit
24
25python do_pythontest_exec_func_python() {
26 bb.build.exec_func('do_pythontest_exit', d)
27}
28addtask do_pythontest_exec_func_python
29
30python do_pythontest_fatal () {
31 print("This is python fatal test stdout")
32 bb.fatal("This is a fatal error")
33}
34addtask do_pythontest_fatal
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
index a76a6bea1b..d7785cee2e 100644
--- a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
@@ -1,21 +1,25 @@
1LICENSE = "MIT" 1LICENSE = "MIT"
2LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 2LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
3 3
4MCMACHINE_virtclass-mcextend-musl = "qemux86-64" 4MCMACHINE:virtclass-mcextend-musl = "qemux86-64"
5MCMACHINE_virtclass-mcextend-tiny = "qemux86" 5MCMACHINE:virtclass-mcextend-tiny = "qemux86"
6MCIMGTYPE_virtclass-mcextend-musl = "ext4" 6MCIMGTYPE:virtclass-mcextend-musl = "ext4"
7MCIMGTYPE_virtclass-mcextend-tiny = "cpio.gz" 7MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz"
8 8
9MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" 9MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}"
10MC_DEPLOY_IMAGE_BASENAME = "core-image-minimal"
10 11
11do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy" 12do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy"
12 13
13do_install () { 14do_install () {
14 install -d ${D}/var/lib/machines/${MCNAME} 15 install -d ${D}/var/lib/machines/${MCNAME}
15 install ${MC_DEPLOY_DIR_IMAGE}/core-image-minimal-${MCMACHINE}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/core-image-minimal.${MCIMGTYPE} 16 install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE}
16 install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} 17 install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME}
17} 18}
18 19
20# for IMAGE_LINK_NAME, IMAGE_BASENAME
21inherit image-artifact-names
22
19python () { 23python () {
20 mcname = d.getVar('MCNAME') 24 mcname = d.getVar('MCNAME')
21 if not mcname: 25 if not mcname:
@@ -23,6 +27,18 @@ python () {
23 multiconfigs = d.getVar('BBMULTICONFIG') or "" 27 multiconfigs = d.getVar('BBMULTICONFIG') or ""
24 if mcname not in multiconfigs: 28 if mcname not in multiconfigs:
25 raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) 29 raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname)
30
31 # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal
32 # as there is no good way to query core-image-minimal's context lets assume that there are no overrides
33 # and that we can just replace IMAGE_BASENAME
34 image_link_name = d.getVar('IMAGE_LINK_NAME')
35 image_basename = d.getVar('IMAGE_BASENAME')
36 machine = d.getVar('MACHINE')
37 mcmachine = d.getVar('MCMACHINE')
38 image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME')
39 image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine)
40 bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy))
41 d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy)
26} 42}
27 43
28BBCLASSEXTEND = "mcextend:tiny mcextend:musl" 44BBCLASSEXTEND = "mcextend:tiny mcextend:musl"
diff --git a/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb
new file mode 100644
index 0000000000..3b59e37619
--- /dev/null
+++ b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Overlayfs class unit test"
2DESCRIPTION = "Contains an overlayfs configuration"
3LICENSE = "MIT"
4
5INHIBIT_DEFAULT_DEPS = "1"
6EXCLUDE_FROM_WORLD = "1"
7
8inherit_defer ${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs", "", d)}
9include test_recipe.inc
10
11OVERLAYFS_WRITABLE_PATHS[mnt-overlay] += "/usr/share/my-application"
12
13do_install() {
14 install -d ${D}/usr/share/my-application
15 install -d ${D}${sysconfdir}
16 echo "Original file in /etc" >> ${D}${sysconfdir}/lower-layer-test.txt
17}
18
19FILES:${PN} += "\
20 ${exec_prefix} \
21 ${sysconfdir} \
22"
diff --git a/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb
new file mode 100644
index 0000000000..5d19a4dd25
--- /dev/null
+++ b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb
@@ -0,0 +1,10 @@
1SUMMARY = "Test case that tries to rename a package to an existing one and fails"
2DESCRIPTION = "This generates a packaging error when a package is renamed to a pre-existing name"
3LICENSE = "MIT"
4
5# Add a new package ${PN}-renametest
6PACKAGES += "${PN}-renametest"
7# ... and try to rename the ${PN}-dev to the new ${PN}-renametest (conflict)
8PKG:${PN}-dev = "${PN}-renametest"
9
10EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend
@@ -0,0 +1,2 @@
1# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
2include test_recipe.inc
diff --git a/meta-selftest/recipes-test/poison/poison.bb b/meta-selftest/recipes-test/poison/poison.bb
new file mode 100644
index 0000000000..e9eee0cdba
--- /dev/null
+++ b/meta-selftest/recipes-test/poison/poison.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Sysroot poisoning test"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6inherit nopackages
7
8# This test confirms that compiling code that searches /usr/include for headers
9# will result in compiler errors. This recipe should will fail to build and
10# oe-selftest has a test that verifies that.
11do_compile() {
12 bbnote Testing preprocessor
13 echo "int main(int argc, char** argv) {}" | ${CPP} -I/usr/include -
14 bbnote Testing C compiler
15 echo "int main(int argc, char** argv) {}" | ${CC} -x c -I/usr/include -
16 bbnote Testing C++ compiler
17 echo "int main(int argc, char** argv) {}" | ${CC} -x c++ -I/usr/include -
18}
19
20EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 913bfabf89..b936c4f44b 100644
--- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -5,19 +5,19 @@ inherit allarch
5 5
6PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing" 6PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing"
7 7
8ALLOW_EMPTY_${PN}-rootfs = "1" 8ALLOW_EMPTY:${PN}-rootfs = "1"
9ALLOW_EMPTY_${PN}-delayed-a = "1" 9ALLOW_EMPTY:${PN}-delayed-a = "1"
10ALLOW_EMPTY_${PN}-delayed-b = "1" 10ALLOW_EMPTY:${PN}-delayed-b = "1"
11ALLOW_EMPTY_${PN}-rootfs-failing = "1" 11ALLOW_EMPTY:${PN}-rootfs-failing = "1"
12 12
13RDEPENDS_${PN}-delayed-a = "${PN}-rootfs" 13RDEPENDS:${PN}-delayed-a = "${PN}-rootfs"
14RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a" 14RDEPENDS:${PN}-delayed-b = "${PN}-delayed-a"
15 15
16TESTDIR = "${sysconfdir}/postinst-test" 16TESTDIR = "${sysconfdir}/postinst-test"
17 17
18# At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or 18# At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or
19# if the function runs on first boot. 19# if the function runs on first boot.
20pkg_postinst_${PN}-rootfs () { 20pkg_postinst:${PN}-rootfs () {
21 set -e 21 set -e
22 22
23 if [ -z "$D" ]; then 23 if [ -z "$D" ]; then
@@ -36,7 +36,7 @@ pkg_postinst_${PN}-rootfs () {
36 36
37# Depends on rootfs, delays until first boot, verifies that the rootfs file was 37# Depends on rootfs, delays until first boot, verifies that the rootfs file was
38# written. 38# written.
39pkg_postinst_ontarget_${PN}-delayed-a () { 39pkg_postinst_ontarget:${PN}-delayed-a () {
40 set -e 40 set -e
41 41
42 if [ ! -e ${TESTDIR}/rootfs ]; then 42 if [ ! -e ${TESTDIR}/rootfs ]; then
@@ -49,7 +49,7 @@ pkg_postinst_ontarget_${PN}-delayed-a () {
49 49
50# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was 50# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was
51# written. This verifies the ordering between delayed postinsts. 51# written. This verifies the ordering between delayed postinsts.
52pkg_postinst_ontarget_${PN}-delayed-b () { 52pkg_postinst_ontarget:${PN}-delayed-b () {
53 set -e 53 set -e
54 54
55 if [ ! -e ${TESTDIR}/delayed-a ]; then 55 if [ ! -e ${TESTDIR}/delayed-a ]; then
@@ -62,7 +62,7 @@ pkg_postinst_ontarget_${PN}-delayed-b () {
62 62
63# This scriptlet intentionally includes a bogus command in the middle to test 63# This scriptlet intentionally includes a bogus command in the middle to test
64# that we catch and report such errors properly. 64# that we catch and report such errors properly.
65pkg_postinst_${PN}-rootfs-failing () { 65pkg_postinst:${PN}-rootfs-failing () {
66 mkdir -p $D${TESTDIR} 66 mkdir -p $D${TESTDIR}
67 touch $D${TESTDIR}/rootfs-before-failure 67 touch $D${TESTDIR}/rootfs-before-failure
68 run_a_really_broken_command 68 run_a_really_broken_command
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
index b5f976708f..e127b48b15 100644
--- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
+++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
@@ -34,9 +34,9 @@ do_install() {
34 install_extrafunc 34 install_extrafunc
35} 35}
36 36
37pkg_postinst_${PN} () { 37pkg_postinst:${PN} () {
38 echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst 38 echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst
39} 39}
40 40
41FILES_${PN} += "${datadir}" 41FILES:${PN} += "${datadir}"
42 42
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
index 0cd0494da8..ad9f475d15 100644
--- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
+++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb
@@ -2,7 +2,7 @@ SUMMARY = "Test recipe for recipeutils.patch_recipe()"
2 2
3require recipeutils-test.inc 3require recipeutils-test.inc
4 4
5LICENSE = "Proprietary" 5LICENSE = "HPND"
6LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" 6LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
7DEPENDS += "zlib" 7DEPENDS += "zlib"
8 8
@@ -10,4 +10,4 @@ BBCLASSEXTEND = "native nativesdk"
10 10
11SRC_URI += "file://somefile" 11SRC_URI += "file://somefile"
12 12
13SRC_URI_append = " file://anotherfile" 13SRC_URI:append = " file://anotherfile"
diff --git a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
index 440471fe80..aa6ce0c2a0 100644
--- a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
+++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb
@@ -10,7 +10,7 @@ S = "${WORKDIR}"
10inherit useradd allarch 10inherit useradd allarch
11 11
12USERADD_PACKAGES = "${PN}" 12USERADD_PACKAGES = "${PN}"
13USERADD_PARAM_${PN} = "-u 1234 -M test" 13USERADD_PARAM:${PN} = "-u 1234 -M test"
14TESTDIR = "${D}${sysconfdir}/selftest-chown" 14TESTDIR = "${D}${sysconfdir}/selftest-chown"
15 15
16do_install() { 16do_install() {
@@ -27,4 +27,4 @@ do_install() {
27 chown -R test:test ${TESTDIR}/fifotest 27 chown -R test:test ${TESTDIR}/fifotest
28} 28}
29 29
30FILES_${PN} = "${sysconfdir}/selftest-chown/*" 30FILES:${PN} = "${sysconfdir}/selftest-chown/*"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
index 4f713f5c0e..1a140a532f 100644
--- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb
@@ -1,11 +1,10 @@
1SUMMARY = "Line-oriented text editor -- selftest GPLv2 version" 1SUMMARY = "Line-oriented text editor -- selftest GPL-2.0-or-later version"
2HOMEPAGE = "http://www.gnu.org/software/ed/" 2HOMEPAGE = "http://www.gnu.org/software/ed/"
3SECTION = "base" 3SECTION = "base"
4LICENSE = "GPLv2+" 4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ 5LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
6 file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" 6 file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
7 7
8PR = "r2"
9SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" 8SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
10 9
11SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" 10SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
@@ -17,8 +16,8 @@ S = "${WORKDIR}/ed-${PV}"
17 16
18EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" 17EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
19 18
20CONFIGUREOPTS_remove = "--disable-dependency-tracking" 19CONFIGUREOPTS:remove = "--disable-dependency-tracking"
21CONFIGUREOPTS_remove = "--disable-silent-rules" 20CONFIGUREOPTS:remove = "--disable-silent-rules"
22EXTRA_OECONF_remove = "--disable-static" 21EXTRA_OECONF:remove = "--disable-static"
23 22
24BBCLASSEXTEND = "native" 23BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
index 08fb415d9d..b92740de32 100644
--- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
+++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Line-oriented text editor -- selftest variant" 1SUMMARY = "Line-oriented text editor -- selftest variant"
2HOMEPAGE = "http://www.gnu.org/software/ed/" 2HOMEPAGE = "http://www.gnu.org/software/ed/"
3 3
4LICENSE = "GPLv3+" 4LICENSE = "GPL-3.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ 5LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \
6 file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \ 6 file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \
7 file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a" 7 file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a"
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
index 842a9772cb..be346b8a0e 100644
--- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
+++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
@@ -25,6 +25,6 @@ do_install () {
25 dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M 25 dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M
26} 26}
27 27
28RDEPENDS_${PN}-gdb += "gdb" 28RDEPENDS:${PN}-gdb += "gdb"
29PACKAGES =+ "${PN}-gdb" 29PACKAGES =+ "${PN}-gdb"
30FILES_${PN}-gdb = "${bindir}/gdb.sh" 30FILES:${PN}-gdb = "${bindir}/gdb.sh"
diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
new file mode 100644
index 0000000000..fc7169b7b8
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(void)
4{
5 printf("Hello world!\n");
6
7 return 0;
8}
diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
new file mode 100644
index 0000000000..547587bef4
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "Simple helloworld application -- selftest variant"
2SECTION = "examples"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6SRC_URI = "file://helloworld.c"
7
8S = "${WORKDIR}"
9
10do_compile() {
11 ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld
12}
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 helloworld ${D}${bindir}
17}
18
19BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/meta-selftest/recipes-test/selftest-users/acreategroup.bb b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
new file mode 100644
index 0000000000..66ed5695a2
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/acreategroup.bb
@@ -0,0 +1,32 @@
1SUMMARY = "creategroup_a"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6S = "${WORKDIR}"
7
8EXCLUDE_FROM_WORLD="1"
9
10inherit useradd allarch
11
12USERADD_PACKAGES = "${PN}"
13USERADD_PARAM:${PN} = "-u 5560 --gid a_group a_user"
14GROUPADD_PARAM:${PN} = "-r a_group"
15
16TESTDIR = "${D}${sysconfdir}/creategroup"
17
18do_install() {
19 install -d ${TESTDIR}
20 install -d ${TESTDIR}/dir
21 touch ${TESTDIR}/file
22 ln -s ./file ${TESTDIR}/symlink
23 install -d ${TESTDIR}/fifotest
24 mkfifo ${TESTDIR}/fifotest/fifo
25
26 chown a_user:a_group ${TESTDIR}/file
27 chown -R a_user:a_group ${TESTDIR}/dir
28 chown -h a_user:a_group ${TESTDIR}/symlink
29 chown -R a_user:a_group ${TESTDIR}/fifotest
30}
31
32FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/bcreategroup.bb b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
new file mode 100644
index 0000000000..c4844dd0da
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb
@@ -0,0 +1,37 @@
1SUMMARY = "creategroup_b"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6# This recipe requires a and c. C requires A. Reverse alpha.
7
8USERADD_DEPENDS = "acreategroup ccreategroup"
9
10S = "${WORKDIR}"
11
12EXCLUDE_FROM_WORLD="1"
13
14inherit useradd allarch
15
16USERADD_PACKAGES = "${PN}"
17USERADD_PARAM:${PN} = "-u 5561 -g b_group -G a_group,c_group b_user "
18GROUPADD_PARAM:${PN} = "-r b_group"
19
20TESTDIR = "${D}${sysconfdir}/creategroup"
21
22do_install() {
23 install -d ${TESTDIR}
24 install -d ${TESTDIR}/dir
25 touch ${TESTDIR}/file
26 ln -s ./file ${TESTDIR}/symlink
27 install -d ${TESTDIR}/fifotest
28 mkfifo ${TESTDIR}/fifotest/fifo
29
30 chown a_user:a_group ${TESTDIR}/file
31 chown -R c_user:c_group ${TESTDIR}/dir
32 chown -h a_user:a_group ${TESTDIR}/symlink
33 chown -R b_user:b_group ${TESTDIR}/fifotest
34}
35
36FILES:${PN} = "${sysconfdir}/creategroup/*"
37
diff --git a/meta-selftest/recipes-test/selftest-users/ccreategroup.bb b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
new file mode 100644
index 0000000000..021b1ebbf7
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb
@@ -0,0 +1,34 @@
1SUMMARY = "creategroup_c"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6USERADD_DEPENDS = "acreategroup"
7
8S = "${WORKDIR}"
9
10EXCLUDE_FROM_WORLD="1"
11
12inherit useradd allarch
13
14USERADD_PACKAGES = "${PN}"
15USERADD_PARAM:${PN} = "-u 5563 --gid c_group -G a_group c_user"
16GROUPADD_PARAM:${PN} = "-r c_group"
17
18TESTDIR = "${D}${sysconfdir}/creategroup"
19
20do_install() {
21 install -d ${TESTDIR}
22 install -d ${TESTDIR}/dir
23 touch ${TESTDIR}/file
24 ln -s ./file ${TESTDIR}/symlink
25 install -d ${TESTDIR}/fifotest
26 mkfifo ${TESTDIR}/fifotest/fifo
27
28 chown c_user:c_group ${TESTDIR}/file
29 chown -R c_user:c_group ${TESTDIR}/dir
30 chown -h c_user:c_group ${TESTDIR}/symlink
31 chown -R c_user:c_group ${TESTDIR}/fifotest
32}
33
34FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup1.bb b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
new file mode 100644
index 0000000000..afd23ed1ee
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/creategroup1.bb
@@ -0,0 +1,30 @@
1SUMMARY = "creategroup pt 1"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6S = "${WORKDIR}"
7
8inherit useradd allarch
9
10USERADD_PACKAGES = "${PN}"
11USERADD_PARAM:${PN} = "-u 5555 --gid grouptest gt1"
12GROUPADD_PARAM:${PN} = "-r grouptest"
13
14TESTDIR = "${D}${sysconfdir}/creategroup"
15
16do_install() {
17 install -d ${TESTDIR}
18 install -d ${TESTDIR}/dir
19 touch ${TESTDIR}/file
20 ln -s ./file ${TESTDIR}/symlink
21 install -d ${TESTDIR}/fifotest
22 mkfifo ${TESTDIR}/fifotest/fifo
23
24 chown gt1:grouptest ${TESTDIR}/file
25 chown -R gt1:grouptest ${TESTDIR}/dir
26 chown -h gt1:grouptest ${TESTDIR}/symlink
27 chown -R gt1:grouptest ${TESTDIR}/fifotest
28}
29
30FILES:${PN} = "${sysconfdir}/creategroup/*"
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup2.bb b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
new file mode 100644
index 0000000000..f776f43aed
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/creategroup2.bb
@@ -0,0 +1,32 @@
1SUMMARY = "creategroup pt 2"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6USERADD_DEPENDS = "creategroup1"
7
8S = "${WORKDIR}"
9
10inherit useradd allarch
11
12USERADD_PACKAGES = "${PN}"
13USERADD_PARAM:${PN} = "-u 5556 --gid grouptest gt2"
14
15TESTDIR = "${D}${sysconfdir}/creategroup"
16
17do_install() {
18 install -d ${TESTDIR}
19 install -d ${TESTDIR}/dir
20 touch ${TESTDIR}/file
21 ln -s ./file ${TESTDIR}/symlink
22 install -d ${TESTDIR}/fifotest
23 mkfifo ${TESTDIR}/fifotest/fifo
24
25 chown gt2:grouptest ${TESTDIR}/file
26 chown -R gt2:grouptest ${TESTDIR}/dir
27 chown -h gt2:grouptest ${TESTDIR}/symlink
28 chown -R gt2:grouptest ${TESTDIR}/fifotest
29}
30
31FILES:${PN} = "${sysconfdir}/creategroup/*"
32
diff --git a/meta-selftest/recipes-test/selftest-users/dcreategroup.bb b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
new file mode 100644
index 0000000000..b96ca92a16
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb
@@ -0,0 +1,33 @@
1SUMMARY = "creategroup_d"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6USERADD_DEPENDS = "bcreategroup"
7
8S = "${WORKDIR}"
9
10EXCLUDE_FROM_WORLD="1"
11
12inherit useradd allarch
13
14USERADD_PACKAGES = "${PN}"
15USERADD_PARAM:${PN} = "-u 5564 -g d_group -G b_group d_user "
16GROUPADD_PARAM:${PN} = "-r d_group"
17
18TESTDIR = "${D}${sysconfdir}/creategroup"
19
20do_install() {
21 install -d ${TESTDIR}
22 install -d ${TESTDIR}/dir
23 touch ${TESTDIR}/file
24 ln -s ./file ${TESTDIR}/symlink
25 install -d ${TESTDIR}/fifotest
26 mkfifo ${TESTDIR}/fifotest/fifo
27
28 chown d_user:d_group ${TESTDIR}/file
29 chown -R d_user:b_group ${TESTDIR}/dir
30 chown -h d_user:d_group ${TESTDIR}/symlink
31 chown -R d_user:b_group ${TESTDIR}/fifotest
32}
33
diff --git a/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
new file mode 100644
index 0000000000..99e04a80b3
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb
@@ -0,0 +1,20 @@
1SUMMARY = "UserAddBadTask"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6DEPENDS:append = "coreutils-native"
7
8S = "${WORKDIR}"
9
10inherit useradd allarch
11
12USERADD_PACKAGES = "${PN}"
13USERADD_PARAM:${PN} = "-u 5555 --gid groupaddtask useraddtask"
14GROUPADD_PARAM:${PN} = "-r groupaddtask"
15
16do_badthingshappen() {
17 echo "foo"
18}
19
20addtask badthingshappen after do_populate_sysroot before do_package
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb
new file mode 100644
index 0000000000..21f06782fb
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb
@@ -0,0 +1,16 @@
1SUMMARY = "Produce a broken la file"
2LICENSE = "CLOSED"
3INHIBIT_DEFAULT_DEPS = "1"
4
5EXCLUDE_FROM_WORLD = "1"
6
7# remove-libtool.bbclass is inherited by default and removes all
8# .la files which for this test we specifically do not want.
9REMOVE_LIBTOOL_LA = "0"
10
11do_install() {
12 install -d ${D}${libdir}/test/
13 echo '${WORKDIR}' > ${D}${libdir}/test/la-test.la
14}
15
16BBCLASSEXTEND += "native"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb
new file mode 100644
index 0000000000..e748310fc4
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb
@@ -0,0 +1,12 @@
1SUMMARY = "Produce a broken pc file"
2LICENSE = "CLOSED"
3INHIBIT_DEFAULT_DEPS = "1"
4
5EXCLUDE_FROM_WORLD = "1"
6
7do_install() {
8 install -d ${D}${libdir}/test/
9 echo '${WORKDIR}' > ${D}${libdir}/test/test.pc
10}
11
12BBCLASSEXTEND += "native"
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb
new file mode 100644
index 0000000000..6c834be897
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb
@@ -0,0 +1,12 @@
1SUMMARY = "Check that shebang does not exceed 128 characters"
2LICENSE = "CLOSED"
3INHIBIT_DEFAULT_DEPS = "1"
4
5EXCLUDE_FROM_WORLD = "1"
6do_install() {
7 install -d ${D}${bindir}
8 echo '#!BiM3cnVd1Amtv6PG+FynrQiVMbZnX5ELgF21q3EkuB+44JEGWtq8TvBJ7EGidfVs3eR3wVOUbLnjYDlKUWcm7YC/ute7f+KDHbwxziRUSUBZAUqgjiQdfQ0HnxajI0ozbM863E9JV9k13yZKYfh9/zR77Y6Dl4Dd3zOWS75LSpkAXV' > ${D}${bindir}/max-shebang
9 chmod 755 ${D}${bindir}/max-shebang
10}
11
12BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend
new file mode 100644
index 0000000000..205720982c
--- /dev/null
+++ b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend
@@ -0,0 +1,2 @@
1# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests.
2include test_recipe.inc
diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt b/meta-selftest/recipes-test/testrpm/files/testfile.txt
new file mode 100644
index 0000000000..c4d7630c1e
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt
@@ -0,0 +1 @@
== This file serves the purposes of SRC_URI only
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
new file mode 100644
index 0000000000..5e8761ab55
--- /dev/null
+++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Test recipe for testing rpm generated by oe-core"
2LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3
4LICENSE = "MIT"
5
6SRC_URI = "file://testfile.txt"
7INHIBIT_DEFAULT_DEPS = "1"
8
9do_compile(){
10 echo "testdata" > ${B}/"file with [brackets].txt"
11 echo "testdata" > ${B}/"file with (parentheses).txt"
12}
13
14do_install(){
15 install ${B}/* ${D}/
16}
17
18FILES:${PN} = "*"
diff --git a/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
new file mode 100644
index 0000000000..c3d3548d4a
--- /dev/null
+++ b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Check that create_cmdline_shebang works"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4INHIBIT_DEFAULT_DEPS = "1"
5
6SRC_URI += "file://test.awk"
7
8EXCLUDE_FROM_WORLD = "1"
9do_install() {
10 install -d ${D}${bindir}
11 # was not able to make ownership preservation check
12 install -m 0400 ${WORKDIR}/test.awk ${D}${bindir}/test
13
14 perm_old="$(stat --format='%a' ${D}${bindir}/test)"
15 sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test
16 create_cmdline_shebang_wrapper ${D}${bindir}/test
17 if [ $(${D}${bindir}/test) != "Don't Panic!" ]; then
18 bbfatal "Wrapper is broken"
19 else
20 bbnote "Wrapper is good"
21 fi
22
23 perm_new="$(stat --format='%a' ${D}${bindir}/test.real)"
24
25 if [ "$perm_new" != "$perm_old" ]; then
26 bbfatal "Wrapper permissions for ${D}${bindir}/test.real not preserved. Found $perm_new but expected $perm_old"
27 fi
28}
29
30BBCLASSEXTEND = "native"
diff --git a/meta-selftest/recipes-test/wrapper/files/test.awk b/meta-selftest/recipes-test/wrapper/files/test.awk
new file mode 100644
index 0000000000..91429197b1
--- /dev/null
+++ b/meta-selftest/recipes-test/wrapper/files/test.awk
@@ -0,0 +1,2 @@
1#! @AWK_BIN@ -f
2BEGIN { print "Don't Panic!" }
diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in
new file mode 100644
index 0000000000..066cd35b15
--- /dev/null
+++ b/meta-selftest/wic/overlayfs_etc.wks.in
@@ -0,0 +1,4 @@
1part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024
2part / --source rootfs --ondisk sda --fstype=${OVERLAYFS_ROOTFS_TYPE} --use-uuid --align 1024
3part --ondisk sda --fstype=ext4 --size=5 --align 1024
4bootloader --ptable gpt --timeout=1 --append="rootfstype=${OVERLAYFS_ROOTFS_TYPE} console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
diff --git a/meta-selftest/wic/test_efi_plugin.wks b/meta-selftest/wic/test_efi_plugin.wks
new file mode 100644
index 0000000000..1603d6c4bb
--- /dev/null
+++ b/meta-selftest/wic/test_efi_plugin.wks
@@ -0,0 +1,6 @@
1# short-description: This file is used in oe-selftest wic module to test efi plugin
2
3part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,create-unified-kernel-image=true,initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --active --align 1024 --use-uuid
4part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
5
6bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_gpt_partition_name.wks b/meta-selftest/wic/test_gpt_partition_name.wks
new file mode 100644
index 0000000000..7db6da9aee
--- /dev/null
+++ b/meta-selftest/wic/test_gpt_partition_name.wks
@@ -0,0 +1,7 @@
1# short-description: image to test part-name in GPT partitions
2
3part --fstype=ext4 --part-name boot-A --label boot --size 1M --align 1024
4part / --source rootfs --fstype=ext4 --part-name root-A --align 1024
5part --fstype=ext4 --label ext-space --size 1M --align 1024
6
7bootloader --ptable gpt
diff --git a/meta-selftest/wic/test_rawcopy_plugin.wks.in b/meta-selftest/wic/test_rawcopy_plugin.wks.in
index 83be4be914..a865dd1d32 100644
--- a/meta-selftest/wic/test_rawcopy_plugin.wks.in
+++ b/meta-selftest/wic/test_rawcopy_plugin.wks.in
@@ -1,6 +1,6 @@
1# short-description: This file is used in oe-selftest wic module to test rawcopy plugin 1# short-description: This file is used in oe-selftest wic module to test rawcopy plugin
2 2
3part /boot --active --source bootimg-pcbios 3part /boot --active --source bootimg-pcbios
4part / --source rawcopy --sourceparams="file=core-image-minimal-${MACHINE}.ext4" --use-uuid 4part / --source rawcopy --sourceparams="file=${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.ext4" --use-uuid
5 5
6bootloader --timeout=0 --append="console=ttyS0,115200n8" 6bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta-selftest/wic/test_uefikernel.wks b/meta-selftest/wic/test_uefikernel.wks
new file mode 100644
index 0000000000..bede2288f6
--- /dev/null
+++ b/meta-selftest/wic/test_uefikernel.wks
@@ -0,0 +1,5 @@
1# short-description: This file is used in oe-selftest wic module to test uefi-kernel loader
2
3part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"
4part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
5