summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2024-08-20 21:54:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-01 11:05:20 +0100
commitb971a3a77cfc01de9dc83e97afc990081f4b9166 (patch)
tree2591a61175262a5b1e80d70a37e9586bad1b299e /meta-selftest
parent36fb595c62d9cc52caaac38e22de3c31350feb37 (diff)
downloadpoky-b971a3a77cfc01de9dc83e97afc990081f4b9166.tar.gz
oeqa/selftest/bbclasses: Add tests for systemd and update-rc.d interaction
These tests verify that the correct files are left behind when systemd is inherited and depending on whether the systemd and/or sysvinit distro features are enabled. (From OE-Core rev: 4ef25caa00ad08046567d0e7f4523486c3a256d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb17
-rw-r--r--meta-selftest/recipes-test/bbclasses/systemd-only.bb12
2 files changed, 29 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb b/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb
new file mode 100644
index 0000000000..f9fc59a494
--- /dev/null
+++ b/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb
@@ -0,0 +1,17 @@
1LICENSE = "MIT"
2
3inherit allarch systemd update-rc.d
4
5do_install() {
6 install -d ${D}${systemd_system_unitdir}
7 touch ${D}${systemd_system_unitdir}/${BPN}.service
8
9 install -d ${D}${INIT_D_DIR}
10 touch ${D}${INIT_D_DIR}/${BPN}
11}
12
13INITSCRIPT_NAME = "${BPN}"
14
15SYSTEMD_SERVICE:${PN} = "${BPN}.service"
16
17EXCLUDE_FROM_WORLD="1"
diff --git a/meta-selftest/recipes-test/bbclasses/systemd-only.bb b/meta-selftest/recipes-test/bbclasses/systemd-only.bb
new file mode 100644
index 0000000000..590a27b9cb
--- /dev/null
+++ b/meta-selftest/recipes-test/bbclasses/systemd-only.bb
@@ -0,0 +1,12 @@
1LICENSE = "MIT"
2
3inherit allarch systemd
4
5do_install() {
6 install -d ${D}${systemd_system_unitdir}
7 touch ${D}${systemd_system_unitdir}/${BPN}.service
8}
9
10SYSTEMD_SERVICE:${PN} = "${BPN}.service"
11
12EXCLUDE_FROM_WORLD="1"