summaryrefslogtreecommitdiff
path: root/poky/meta-selftest
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta-selftest')
-rw-r--r--poky/meta-selftest/classes/test-mkimage-wrapper.bbclass19
-rw-r--r--poky/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb17
-rw-r--r--poky/meta-selftest/recipes-test/bbclasses/systemd-only.bb12
-rw-r--r--poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb5
-rw-r--r--poky/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb13
5 files changed, 46 insertions, 20 deletions
diff --git a/poky/meta-selftest/classes/test-mkimage-wrapper.bbclass b/poky/meta-selftest/classes/test-mkimage-wrapper.bbclass
deleted file mode 100644
index 7c98d7b71e..0000000000
--- a/poky/meta-selftest/classes/test-mkimage-wrapper.bbclass
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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/poky/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb b/poky/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb
new file mode 100644
index 0000000000..f9fc59a494
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb
@@ -0,0 +1,17 @@
+LICENSE = "MIT"
+
+inherit allarch systemd update-rc.d
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}
+ touch ${D}${systemd_system_unitdir}/${BPN}.service
+
+ install -d ${D}${INIT_D_DIR}
+ touch ${D}${INIT_D_DIR}/${BPN}
+}
+
+INITSCRIPT_NAME = "${BPN}"
+
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+
+EXCLUDE_FROM_WORLD="1"
diff --git a/poky/meta-selftest/recipes-test/bbclasses/systemd-only.bb b/poky/meta-selftest/recipes-test/bbclasses/systemd-only.bb
new file mode 100644
index 0000000000..590a27b9cb
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/bbclasses/systemd-only.bb
@@ -0,0 +1,12 @@
+LICENSE = "MIT"
+
+inherit allarch systemd
+
+do_install() {
+ install -d ${D}${systemd_system_unitdir}
+ touch ${D}${systemd_system_unitdir}/${BPN}.service
+}
+
+SYSTEMD_SERVICE:${PN} = "${BPN}.service"
+
+EXCLUDE_FROM_WORLD="1"
diff --git a/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
index a897966608..11928dc95a 100644
--- a/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
+++ b/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -6,12 +6,15 @@ DEPENDS = "libgfortran"
SRC_URI = "file://hello.f95"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"
+
# These set flags that Fortran doesn't support
SECURITY_CFLAGS = ""
SECURITY_LDFLAGS = ""
do_compile() {
- ${FC} ${LDFLAGS} ${UNPACKDIR}/hello.f95 -o ${B}/fortran-hello
+ ${FC} ${LDFLAGS} hello.f95 -o ${B}/fortran-hello
}
do_install() {
diff --git a/poky/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/poky/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
index 5632bdac7a..64fea8ed95 100644
--- a/poky/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
+++ b/poky/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb
@@ -11,6 +11,9 @@ UNPACKDIR = "${S}"
do_compile () {
${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS}
+
+ ${CC} hello.c -c -o hello.o ${CFLAGS}
+ ${AR} rcs libhello.a hello.o
}
do_install () {
@@ -23,9 +26,19 @@ do_install () {
ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3
ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4
+ # We need so many hardlink copies to look for specific race conditions
+ install -d ${D}${libdir}
+ install -m 0644 libhello.a ${D}${libdir}
+ for num in `seq 1 100` ; do
+ ln ${D}${libdir}/libhello.a ${D}${libdir}/libhello-${num}.a
+ done
+
dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M
}
RDEPENDS:${PN}-gdb += "gdb"
PACKAGES =+ "${PN}-gdb"
FILES:${PN}-gdb = "${bindir}/gdb.sh"
+
+PACKAGE_STRIP_STATIC = "1"
+PACKAGE_DEBUG_STATIC_SPLIT = "1"