diff options
Diffstat (limited to 'meta-selftest')
68 files changed, 549 insertions, 70 deletions
diff --git a/meta-selftest/COPYING.MIT b/meta-selftest/COPYING.MIT deleted file mode 100644 index 89de354795..0000000000 --- a/meta-selftest/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/meta-selftest/classes/test-mkimage-wrapper.bbclass b/meta-selftest/classes/test-mkimage-wrapper.bbclass new file mode 100644 index 0000000000..7c98d7b71e --- /dev/null +++ b/meta-selftest/classes/test-mkimage-wrapper.bbclass @@ -0,0 +1,19 @@ +# Class to test UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN +# (in conjunction with kernel-fitimage.bbclass) +# +# SPDX-License-Identifier: MIT +# + +UBOOT_MKIMAGE = "test_mkimage_wrapper" +UBOOT_MKIMAGE_SIGN = "test_mkimage_signing_wrapper" + +test_mkimage_wrapper() { + echo "### uboot-mkimage wrapper message" + uboot-mkimage "$@" +} + +test_mkimage_signing_wrapper() { + echo "### uboot-mkimage signing wrapper message" + uboot-mkimage "$@" +} + diff --git a/meta-selftest/conf/layer.conf b/meta-selftest/conf/layer.conf index 0626b2a3ea..47b917f348 100644 --- a/meta-selftest/conf/layer.conf +++ b/meta-selftest/conf/layer.conf @@ -9,4 +9,4 @@ BBFILE_COLLECTIONS += "selftest" BBFILE_PATTERN_selftest = "^${LAYERDIR}/" BBFILE_PRIORITY_selftest = "5" -LAYERSERIES_COMPAT_selftest = "thud" +LAYERSERIES_COMPAT_selftest = "kirkstone" diff --git a/meta-selftest/files/static-group b/meta-selftest/files/static-group index 9213b8e9bc..b2e0e2f870 100644 --- a/meta-selftest/files/static-group +++ b/meta-selftest/files/static-group @@ -11,4 +11,15 @@ avahi:x:509: avahi-autoipd:x:510: rpc:x:511: rpcuser:x:513: - +dhcpcd:x:514: +sshd:x:516: +lpadmin:x:517: +crontab:x:518: +tracing:x:519: +pulse:x:520: +bind:x:521: +builder:x:522: +_apt:x:523: +weston-launch:x:524: +weston:x:525: +wayland:x:526: diff --git a/meta-selftest/files/static-passwd b/meta-selftest/files/static-passwd index 412f85d469..2cfd0c9b42 100644 --- a/meta-selftest/files/static-passwd +++ b/meta-selftest/files/static-passwd @@ -9,3 +9,11 @@ avahi-autoipd:x:510:510::/:/bin/nologin rpc:x:511:511::/:/bin/nologin distcc:x:512:nogroup::/:/bin/nologin rpcuser:x:513:513::/var/lib/nfs:/bin/nologin +dhcpcd:x:514:514::/:/bin/nologin +tester:x:515:515::/:/bin/nologin +sshd:x:516:516::/:/bin/nologin +pulse:x:520:520::/:/bin/nologin +bind:x:521:521::/:/bin/nologin +builder:x:522:522::/:/bin/nologin +_apt:x:523:523::/:/bin/nologin +weston:x:525:525::/:/bin/nologin diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py new file mode 100644 index 0000000000..144decdd6b --- /dev/null +++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py @@ -0,0 +1,18 @@ +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +import subprocess +import oe.lsb + +class VirglTest(OERuntimeTestCase): + + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_kernel_driver(self): + status, output = self.target.run('dmesg|grep virgl') + self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output)) + self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output)) + + @OETestDepends(['virgl.VirglTest.test_kernel_driver']) + def test_kmscube(self): + status, output = self.target.run('kmscube') + self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output)) + self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output)) diff --git a/meta-selftest/lib/pseudo_pyc_test1.py b/meta-selftest/lib/pseudo_pyc_test1.py new file mode 100644 index 0000000000..b59abdd536 --- /dev/null +++ b/meta-selftest/lib/pseudo_pyc_test1.py @@ -0,0 +1 @@ +STRING = "pseudo_pyc_test1" diff --git a/meta-selftest/lib/pseudo_pyc_test2.py b/meta-selftest/lib/pseudo_pyc_test2.py new file mode 100644 index 0000000000..fb67a978e0 --- /dev/null +++ b/meta-selftest/lib/pseudo_pyc_test2.py @@ -0,0 +1 @@ +STRING = "pseudo_pyc_test2" diff --git a/meta-selftest/recipes-devtools/python/python-async-test.inc b/meta-selftest/recipes-devtools/python/python-async-test.inc index c9602e8e52..6d7c7458b0 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 @@ SUMMARY = "Python framework to process interdependent tasks in a pool of workers" HOMEPAGE = "http://github.com/gitpython-developers/async" SECTION = "devel/python" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e" inherit pypi @@ -11,6 +11,6 @@ PYPI_PACKAGE = "async" SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b" SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051" -RDEPENDS_${PN} += "${PYTHON_PN}-threading" +RDEPENDS:${PN} += "${PYTHON_PN}-threading" BBCLASSEXTEND = "nativesdk" 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 922518bc39..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,12 +4,11 @@ SUMMARY = "GNU Aspell spell-checker" SECTION = "console/utils" +HOMEPAGE = "https://ftp.gnu.org/gnu/aspell/" -LICENSE = "LGPLv2 | LGPLv2.1" +LICENSE = "LGPL-2.0-only | LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" -PR = "r1" - SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7" SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1" @@ -21,15 +20,15 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses" PACKAGES += "libaspell libpspell libpspell-dev aspell-utils" -FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*" -FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*" -FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*" -FILES_${PN} = "${bindir}/aspell" -FILES_libpspell = "${libdir}/libpspell.so.*" -FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" +FILES:${PN}-dbg += "${libdir}/aspell-0.60/.debu*" +FILES:libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*" +FILES:aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*" +FILES:${PN} = "${bindir}/aspell" +FILES:libpspell = "${libdir}/libpspell.so.*" +FILES:libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" -ARM_INSTRUCTION_SET_armv6 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" inherit autotools gettext diff --git a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend b/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend index 205720982c..205720982c 100644 --- a/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend +++ b/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend 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 @@ +# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. +include 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" INHIBIT_DEFAULT_DEPS = "1" -do_install_append() { +do_install:append() { install -d ${D}${bindir} touch ${D}${bindir}/theapp } diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb new file mode 100644 index 0000000000..f12bee0b3d --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb @@ -0,0 +1,8 @@ +SUMMARY = "devtool test for overrides and patches" +LICENSE = "CLOSED" +INHIBIT_DEFAULT_DEPS = "1" +EXCLUDE_FROM_WORLD = "1" + +SRC_URI = "file://source;subdir=${BP}" +SRC_URI:append:qemuarm = " file://arm.patch;striplevel=0" +SRC_URI:append:qemux86 = " file://x86.patch;striplevel=0" diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch new file mode 100644 index 0000000000..e33a2753f9 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch @@ -0,0 +1,5 @@ +--- source.orig 2020-10-06 13:26:10.792688630 +0100 ++++ source 2020-10-06 13:26:18.853424694 +0100 +@@ -1 +1 @@ +-This is a test for something ++This is a test for qemuarm diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch new file mode 100644 index 0000000000..1a0a175fa8 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch @@ -0,0 +1,5 @@ +--- source.orig 2020-10-06 13:26:10.792688630 +0100 ++++ source 2020-10-06 13:26:18.853424694 +0100 +@@ -1 +1 @@ +-This is a test for something ++This is a test for qemux86 diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source new file mode 100644 index 0000000000..cc14ce627c --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/source @@ -0,0 +1 @@ +This is a test for something diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb new file mode 100644 index 0000000000..6a3d58c884 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb @@ -0,0 +1,9 @@ +LICENSE = "CLOSED" +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "file://${BPN}.tar.gz \ + file://${BPN}.patch" + +S = "${WORKDIR}/${BPN}" + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch new file mode 100644 index 0000000000..96ea0eb4e3 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch @@ -0,0 +1,7 @@ +diff --git a/ignored b/ignored +index a579759..e3d7b43 100644 +--- a/ignored ++++ b/ignored +@@ -1 +1 @@ +-I'm so ignored ++# I'm so ignored diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected new file mode 100644 index 0000000000..68ec6d9875 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected @@ -0,0 +1,16 @@ +From 3a286343cc5cadd83f41d524ee3606ae51df9ee7 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Thu, 28 May 2020 01:32:31 +0200 +Subject: [PATCH] meta-selftest: add test of .gitignore in tarball + +--- + ignored | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ignored b/ignored +index a579759..e3d7b43 100644 +--- a/ignored ++++ b/ignored +@@ -1 +1 @@ +-I'm so ignored ++# I'm so ignored diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz Binary files differnew file mode 100644 index 0000000000..b2e9935eb9 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.tar.gz 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..463cfe0a7a 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 @@ -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb new file mode 100644 index 0000000000..3ec22cae7f --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb @@ -0,0 +1,9 @@ +LICENSE = "CLOSED" +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "file://${BPN}.tar.gz \ + file://0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch" + +S = "${WORKDIR}/${BPN}" + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch new file mode 100644 index 0000000000..6aaf409ebc --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch @@ -0,0 +1,7 @@ +diff --git a/patch-me b/patch-me +index a20b29a..5e35d1b 100644 +--- a/patch-me ++++ b/patch-me +@@ -1 +1 @@ +-please ++NO diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected new file mode 100644 index 0000000000..1bf25a61d0 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected @@ -0,0 +1,16 @@ +From 45ba3d107ea60777a6b6e134fd00fe5009749177 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Thu, 28 May 2020 02:03:39 +0200 +Subject: [PATCH] meta-selftest: add test for .patch file with long filename + +--- + patch-me | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/patch-me b/patch-me +index a20b29a..5e35d1b 100644 +--- a/patch-me ++++ b/patch-me +@@ -1 +1 @@ +-please ++NO diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz Binary files differnew file mode 100644 index 0000000000..ab6242aae7 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/devtool-test-long-filename.tar.gz 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 @@ -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "libxres libxext virtual/libx11 ncurses" diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch new file mode 100644 index 0000000000..c4f3f12666 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch @@ -0,0 +1,37 @@ +commit ced2ec32b657a7f52604b2e16e5d5881041c517a +Author: OpenEmbedded <oe.patch@oe> +Date: Mon Nov 18 18:43:15 2019 +0100 + + Backport of the NEWS file from version 1.6.0 + +diff --git a/doc/NEWS b/doc/NEWS +index 69793fc..fd49b1c 100644 +--- a/doc/NEWS ++++ b/doc/NEWS +@@ -1,3 +1,26 @@ ++1.6.0 - 15 March 2015 ++ - fix lstat64 support when unavailable - separate patches supplied by ++ Ganael Laplanche and Peter Korsgaard ++ - (#1506) new option "-D" / "--delay-start" to only show bar after N ++ seconds (Damon Harper) ++ - new option "--fineta" / "-I" to show ETA as time of day rather than time ++ remaining - patch supplied by Erkki Seppälä (r147) ++ - (#1509) change ETA (--eta / -e) so that days are given if the hours ++ remaining are 24 or more (Jacek Wielemborek) ++ - (#1499) repeat read and write attempts on partial buffer fill/empty to ++ work around post-signal transfer rate drop reported by Ralf Ramsauer ++ - (#1507) do not try to calculate total size in line mode, due to bug ++ reported by Jacek Wielemborek and Michiel Van Herwegen ++ - cleanup: removed defunct RATS comments and unnecessary copyright notices ++ - clean up displayed lines when using --watchfd PID, when PID exits ++ - output errors on a new line to avoid overwriting transfer bar ++ ++1.5.7 - 26 August 2014 ++ - show KiB instead of incorrect kiB (Debian bug #706175) ++ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn) ++ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales ++ - fix "make rpm" and "make srpm", extend "make release" to sign releases ++ + 1.5.3 - 4 May 2014 + - remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda) + diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb index 333ecac7ed..fee5bee739 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb @@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded index 9d94f671db..d75df0c8c7 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded @@ -3,11 +3,12 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" -SRC_URI[md5sum] = "062bca5ff33df1dd09472e7fc3bbe332" SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" S = "${WORKDIR}/pv-${PV}" 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..203f4b61c2 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb @@ -1,7 +1,7 @@ SUMMARY = "A simple tool to wait for a specific signal over DBus" HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" SECTION = "base" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "dbus" @@ -11,7 +11,7 @@ SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717" PV = "0.1+git${SRCPV}" PR = "r2" -SRC_URI = "git://git.yoctoproject.org/dbus-wait" +SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master" UPSTREAM_CHECK_COMMITS = "1" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" 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..3d45fc4857 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,7 +1,7 @@ SUMMARY = "A simple tool to wait for a specific signal over DBus" HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" SECTION = "base" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "dbus" @@ -10,7 +10,7 @@ DEPENDS = "dbus" SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517" PV = "0.1+git${SRCPV}" -SRC_URI = "git://git.yoctoproject.org/dbus-wait" +SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master" UPSTREAM_CHECK_COMMITS = "1" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/meta-selftest/recipes-test/fortran/files/hello.f95 b/meta-selftest/recipes-test/fortran/files/hello.f95 new file mode 100644 index 0000000000..a0745fc64d --- /dev/null +++ b/meta-selftest/recipes-test/fortran/files/hello.f95 @@ -0,0 +1,5 @@ +program helloworld + + print * , "Hello World!" + +end program helloworld diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb new file mode 100644 index 0000000000..3a46404477 --- /dev/null +++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb @@ -0,0 +1,24 @@ +SUMMARY = "Fortran Hello World" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "libgfortran" + +SRC_URI = "file://hello.f95" + +# These set flags that Fortran doesn't support +SECURITY_CFLAGS = "" +SECURITY_LDFLAGS = "" + +do_compile() { + ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello +} + +do_install() { + install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello +} + +python () { + if not d.getVar("FORTRAN"): + raise bb.parse.SkipRecipe("Fortran isn't enabled") +} 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 new file mode 100644 index 0000000000..cc5d7eae5a --- /dev/null +++ b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb @@ -0,0 +1,9 @@ +SUMMARY = "Test recipe for fetching git submodules" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master" +SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" 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 @@ +SUMMARY = "Test recipe for git repo initialization" +HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +INHIBIT_DEFAULT_DEPS = "1" + +PATCHTOOL="git" + +SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \ + file://0001-testpatch.patch \ + " + +SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" + +S = "${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 @@ +diff --git a/Makefile.am b/Makefile.am +index 432a9b4..bbf7c74 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,4 @@ ++## This is useless comment to test if patch works + ACLOCAL_AMFLAGS = -I m4 + + 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..602e895199 --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb @@ -0,0 +1,16 @@ +SUMMARY = "Test recipe for fetching git submodules" +HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +INHIBIT_DEFAULT_DEPS = "1" + +TAGVALUE = "2.10" + +# Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again. +SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https" +SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}" +SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" +SRCREV:gitunpack-enable-recipe = "" + +S = "${WORKDIR}/git" diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb new file mode 100644 index 0000000000..597c89b199 --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb @@ -0,0 +1,5 @@ +require gitunpackoffline-fail.bb + +TAGVALUE = "2.11" + +PV = "0.0+git${SRCPV}" diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb index 5d4d10eef6..e295943ae5 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 @@ SUMMARY = "An image used during oe-selftest tests" -IMAGE_INSTALL = "packagegroup-core-boot dropbear" +# libudev is needed for deploy mdadm via devtool +IMAGE_INSTALL = "packagegroup-core-boot dropbear libudev" IMAGE_FEATURES = "debug-tweaks" IMAGE_LINGUAS = " " diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb index e1da203b59..84d3721885 100644 --- a/meta-selftest/recipes-test/images/wic-image-minimal.bb +++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb @@ -6,7 +6,10 @@ IMAGE_INSTALL = "packagegroup-core-boot" IMAGE_FSTYPES = "wic" -WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native" +WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native" +WKS_FILE_DEPENDS:append:x86 = " syslinux-native syslinux" +WKS_FILE_DEPENDS:append:x86-64 = " syslinux-native syslinux" +WKS_FILE_DEPENDS:append:x86-x32 = " syslinux-native syslinux" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" diff --git a/meta-selftest/recipes-test/license/incompatible-license-alias.bb b/meta-selftest/recipes-test/license/incompatible-license-alias.bb new file mode 100644 index 0000000000..e0b4e13c26 --- /dev/null +++ b/meta-selftest/recipes-test/license/incompatible-license-alias.bb @@ -0,0 +1,3 @@ +SUMMARY = "Recipe with an alias of an SPDX license" +DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing" +LICENSE = "GPLv3" diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb new file mode 100644 index 0000000000..282f5c2875 --- /dev/null +++ b/meta-selftest/recipes-test/license/incompatible-license.bb @@ -0,0 +1,3 @@ +SUMMARY = "Recipe with an SPDX license" +DESCRIPTION = "Is licensed with an SPDX license to be used for testing" +LICENSE = "GPL-3.0-only" diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb new file mode 100644 index 0000000000..9709892644 --- /dev/null +++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb @@ -0,0 +1,3 @@ +SUMMARY = "Recipe with multiple SPDX licenses" +DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" +LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-3.0-only" diff --git a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb new file mode 100644 index 0000000000..35af0966ef --- /dev/null +++ b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb @@ -0,0 +1,3 @@ +SUMMARY = "Recipe with a non-SPDX license" +DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing" +LICENSE = "FooLicense" 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 @@ +SUMMARY = "Destined to fail" +LICENSE = "CLOSED" + +deltask do_patch +INHIBIT_DEFAULT_DEPS = "1" + +do_shelltest() { + echo "This is shell stdout" + echo "This is shell stderr" >&2 + exit 1 +} +addtask do_shelltest + +python do_pythontest_exec_func_shell() { + bb.build.exec_func('do_shelltest', d) +} +addtask do_pythontest_exec_func_shell + +python do_pythontest_exit () { + print("This is python stdout") + sys.exit(1) +} +addtask do_pythontest_exit + +python do_pythontest_exec_func_python() { + bb.build.exec_func('do_pythontest_exit', d) +} +addtask do_pythontest_exec_func_python + +python do_pythontest_fatal () { + print("This is python fatal test stdout") + bb.fatal("This is a fatal error") +} +addtask 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 new file mode 100644 index 0000000000..daf2834958 --- /dev/null +++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb @@ -0,0 +1,28 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +MCMACHINE:virtclass-mcextend-musl = "qemux86-64" +MCMACHINE:virtclass-mcextend-tiny = "qemux86" +MCIMGTYPE:virtclass-mcextend-musl = "ext4" +MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz" + +MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" + +do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy" + +do_install () { + install -d ${D}/var/lib/machines/${MCNAME} + install ${MC_DEPLOY_DIR_IMAGE}/core-image-minimal-${MCMACHINE}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/core-image-minimal.${MCIMGTYPE} + install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} +} + +python () { + mcname = d.getVar('MCNAME') + if not mcname: + raise bb.parse.SkipRecipe("Not a multiconfig target") + multiconfigs = d.getVar('BBMULTICONFIG') or "" + if mcname not in multiconfigs: + raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) +} + +BBCLASSEXTEND = "mcextend:tiny mcextend:musl" diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb new file mode 100644 index 0000000000..6236697453 --- /dev/null +++ b/meta-selftest/recipes-test/multiconfig/multiconfig-test-parse.bb @@ -0,0 +1,11 @@ +SUMMARY = "Test Multiconfig Parsing" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" + +do_showvar() { + bbplain "MCTESTVAR=${MCTESTVAR}" +} +addtask do_showvar + diff --git a/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb b/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb new file mode 100644 index 0000000000..154df910e4 --- /dev/null +++ b/meta-selftest/recipes-test/nopackages/selftest-nopackages.bb @@ -0,0 +1,6 @@ +SUMMARY = "Test recipe for nopackages bbclass" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +INHIBIT_DEFAULT_DEPS = "1" +inherit nopackages 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..913a4d1fdb --- /dev/null +++ b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb @@ -0,0 +1,17 @@ +SUMMARY = "Overlayfs class unit test" +DESCRIPTION = "Contains an overlayfs configuration" +LICENSE = "MIT" + +INHIBIT_DEFAULT_DEPS = "1" +EXCLUDE_FROM_WORLD = "1" + +inherit ${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs", "", d)} +include test_recipe.inc + +OVERLAYFS_WRITABLE_PATHS[mnt-overlay] += "/usr/share/my-application" + +do_install() { + install -d ${D}/usr/share/my-application +} + +FILES:${PN} += "/usr" diff --git a/meta-selftest/recipes-test/poison/poison.bb b/meta-selftest/recipes-test/poison/poison.bb new file mode 100644 index 0000000000..7ace901cc3 --- /dev/null +++ b/meta-selftest/recipes-test/poison/poison.bb @@ -0,0 +1,16 @@ +SUMMARY = "Sysroot poisoning test" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +LICENSE = "MIT" + +inherit nopackages + +# This test confirms that compiling code that searches /usr/include for headers +# will result in compiler errors. This recipe should will fail to build and +# oe-selftest has a test that verifies that. +do_compile() { + touch empty.c + ${CPP} ${CFLAGS} -I/usr/include empty.c +} + +EXCLUDE_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 PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing" -ALLOW_EMPTY_${PN}-rootfs = "1" -ALLOW_EMPTY_${PN}-delayed-a = "1" -ALLOW_EMPTY_${PN}-delayed-b = "1" -ALLOW_EMPTY_${PN}-rootfs-failing = "1" +ALLOW_EMPTY:${PN}-rootfs = "1" +ALLOW_EMPTY:${PN}-delayed-a = "1" +ALLOW_EMPTY:${PN}-delayed-b = "1" +ALLOW_EMPTY:${PN}-rootfs-failing = "1" -RDEPENDS_${PN}-delayed-a = "${PN}-rootfs" -RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a" +RDEPENDS:${PN}-delayed-a = "${PN}-rootfs" +RDEPENDS:${PN}-delayed-b = "${PN}-delayed-a" TESTDIR = "${sysconfdir}/postinst-test" # At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or # if the function runs on first boot. -pkg_postinst_${PN}-rootfs () { +pkg_postinst:${PN}-rootfs () { set -e if [ -z "$D" ]; then @@ -36,7 +36,7 @@ pkg_postinst_${PN}-rootfs () { # Depends on rootfs, delays until first boot, verifies that the rootfs file was # written. -pkg_postinst_ontarget_${PN}-delayed-a () { +pkg_postinst_ontarget:${PN}-delayed-a () { set -e if [ ! -e ${TESTDIR}/rootfs ]; then @@ -49,7 +49,7 @@ pkg_postinst_ontarget_${PN}-delayed-a () { # Depends on delayed-a, delays until first boot, verifies that the delayed-a file was # written. This verifies the ordering between delayed postinsts. -pkg_postinst_ontarget_${PN}-delayed-b () { +pkg_postinst_ontarget:${PN}-delayed-b () { set -e if [ ! -e ${TESTDIR}/delayed-a ]; then @@ -62,7 +62,7 @@ pkg_postinst_ontarget_${PN}-delayed-b () { # This scriptlet intentionally includes a bogus command in the middle to test # that we catch and report such errors properly. -pkg_postinst_${PN}-rootfs-failing () { +pkg_postinst:${PN}-rootfs-failing () { mkdir -p $D${TESTDIR} touch $D${TESTDIR}/rootfs-before-failure run_a_really_broken_command diff --git a/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb b/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb new file mode 100644 index 0000000000..12dc91a8f3 --- /dev/null +++ b/meta-selftest/recipes-test/pseudo-pyc-test/pseudo-pyc-test.bb @@ -0,0 +1,15 @@ +SUMMARY = "pseudo env test" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" + +python do_compile() { + import pseudo_pyc_test1 + print(pseudo_pyc_test1.STRING) +} + +python do_install() { + import pseudo_pyc_test2 + print(pseudo_pyc_test2.STRING) +} diff --git a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile b/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile deleted file mode 100644 index 1e20a2b03e..0000000000 --- a/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile +++ /dev/null @@ -1 +0,0 @@ -A file matched by a glob in SRC_URI diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb index 7375c47933..e127b48b15 100644 --- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb +++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb @@ -10,7 +10,6 @@ SRC_URI = "file://installscript.sh \ file://file1 \ file://add-file.patch \ file://subdir \ - file://selftest-replaceme-src-glob* \ file://selftest-replaceme-inst-globfile \ file://selftest-replaceme-inst-todir-globfile \ file://selftest-replaceme-inst-func" @@ -27,7 +26,6 @@ do_install() { install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir} install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir - install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir} install -d ${D}${sysconfdir} @@ -36,9 +34,9 @@ do_install() { install_extrafunc } -pkg_postinst_${PN} () { +pkg_postinst:${PN} () { echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst } -FILES_${PN} += "${datadir}" +FILES:${PN} += "${datadir}" 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 7c20d9a683..062d6a7a05 100644 --- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb @@ -4,10 +4,10 @@ require recipeutils-test.inc LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" -DEPENDS += "virtual/libx11" +DEPENDS += "zlib" BBCLASSEXTEND = "native nativesdk" SRC_URI += "file://somefile" -SRC_URI_append = " file://anotherfile" +SRC_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 new file mode 100644 index 0000000000..aa6ce0c2a0 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb @@ -0,0 +1,30 @@ +SUMMARY = "selftest chown" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +LICENSE = "MIT" + +DEPENDS += "coreutils-native" + +S = "${WORKDIR}" + +inherit useradd allarch + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "-u 1234 -M test" +TESTDIR = "${D}${sysconfdir}/selftest-chown" + +do_install() { + install -d ${TESTDIR} + install -d ${TESTDIR}/dir + touch ${TESTDIR}/file + ln -s ./file ${TESTDIR}/symlink + install -d ${TESTDIR}/fifotest + mkfifo ${TESTDIR}/fifotest/fifo + + chown test:test ${TESTDIR}/file + chown -R test:test ${TESTDIR}/dir + chown -h test:test ${TESTDIR}/symlink + chown -R test:test ${TESTDIR}/fifotest +} + +FILES:${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 8e0d1cdd8e..c5037a4912 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,7 +1,7 @@ -SUMMARY = "Line-oriented text editor -- selftest GPLv2 version" +SUMMARY = "Line-oriented text editor -- selftest GPL-2.0-or-later version" HOMEPAGE = "http://www.gnu.org/software/ed/" SECTION = "base" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" @@ -17,6 +17,8 @@ S = "${WORKDIR}/ed-${PV}" EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" -CONFIGUREOPTS_remove = "--disable-dependency-tracking" -CONFIGUREOPTS_remove = "--disable-silent-rules" -EXTRA_OECONF_remove = "--disable-static" +CONFIGUREOPTS:remove = "--disable-dependency-tracking" +CONFIGUREOPTS:remove = "--disable-silent-rules" +EXTRA_OECONF:remove = "--disable-static" + +BBCLASSEXTEND = "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 8a2b565ce5..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 @@ SUMMARY = "Line-oriented text editor -- selftest variant" HOMEPAGE = "http://www.gnu.org/software/ed/" -LICENSE = "GPLv3+" +LICENSE = "GPL-3.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \ file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a" @@ -34,3 +34,5 @@ do_install() { rm -f ${D}${infodir}/dir fi } + +BBCLASSEXTEND = "native" 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 () { dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M } -RDEPENDS_${PN}-gdb += "gdb" +RDEPENDS:${PN}-gdb += "gdb" PACKAGES =+ "${PN}-gdb" -FILES_${PN}-gdb = "${bindir}/gdb.sh" +FILES:${PN}-gdb = "${bindir}/gdb.sh" diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb new file mode 100644 index 0000000000..36a682c53d --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb @@ -0,0 +1,14 @@ +LICENSE = "CLOSED" + +PROVIDES = "virtual/sysroot-test" +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +TESTSTRING ?= "1" + +do_install() { + install -d ${D}${includedir} + echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h +} + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb new file mode 100644 index 0000000000..67172f3cab --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb @@ -0,0 +1,14 @@ +LICENSE = "CLOSED" + +PROVIDES = "virtual/sysroot-test" +INHIBIT_DEFAULT_DEPS = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +TESTSTRING ?= "2" + +do_install() { + install -d ${D}${includedir} + echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h +} + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb new file mode 100644 index 0000000000..560487c159 --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb @@ -0,0 +1,6 @@ +SUMMARY = "Virtual provider sysroot test" +LICENSE = "CLOSED" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "virtual/sysroot-test" + +EXCLUDE_FROM_WORLD = "1" 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 @@ +# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. +include test_recipe.inc diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in new file mode 100644 index 0000000000..1e1e5836e7 --- /dev/null +++ b/meta-selftest/wic/overlayfs_etc.wks.in @@ -0,0 +1,4 @@ +part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024 +part / --source rootfs --ondisk sda --fstype=ext4 --use-uuid --align 1024 +part --ondisk sda --fstype=ext4 --size=5 --align 1024 +bootloader --ptable gpt --timeout=1 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}" diff --git a/meta-selftest/wic/test_biosplusefi_plugin.wks b/meta-selftest/wic/test_biosplusefi_plugin.wks new file mode 100644 index 0000000000..5a56c84518 --- /dev/null +++ b/meta-selftest/wic/test_biosplusefi_plugin.wks @@ -0,0 +1,6 @@ +# short-description: This file is used in oe-selftest wic module to test biosplusefi plugin + +part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid +part / --source rootfs --fstype=ext4 --align 1024 --use-uuid + +bootloader --timeout=0 --append="console=ttyS0,115200n8" 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 @@ +# short-description: This file is used in oe-selftest wic module to test efi plugin + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,create-unified-kernel-image=true,initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --active --align 1024 --use-uuid +part / --source rootfs --fstype=ext4 --align 1024 --use-uuid + +bootloader --timeout=0 --append="console=ttyS0,115200n8" diff --git a/meta-selftest/wic/test_empty_plugin.wks b/meta-selftest/wic/test_empty_plugin.wks new file mode 100644 index 0000000000..4e91e04e19 --- /dev/null +++ b/meta-selftest/wic/test_empty_plugin.wks @@ -0,0 +1,4 @@ +# short-description: image for checking empty partition creation + +part / --source rootfs --fstype=ext4 --align 1024 --use-uuid +part empty --source empty --ondisk sda --size 1024 --align 1024 |