* [OE-core][PATCH v3] systemd: re-enable ptest support
@ 2026-09-07 11:45 Himani Ramesh Barde
2026-09-08 6:59 ` Mathieu Dubois-Briand
2026-09-08 7:46 ` Jose Quaresma
0 siblings, 2 replies; 5+ messages in thread
From: Himani Ramesh Barde @ 2026-09-07 11:45 UTC (permalink / raw)
To: openembedded-core
Cc: Randy.MacLeod, ross.burton, jose.quaresma, raj.khem,
richard.purdie, Shiva.Komati, Himani Ramesh Barde
ptest support for systemd was dropped in 2018 (commit 906230a73b3c)
when the recipe switched to meson, as there was no easy way to install
and run the test suite. Current systemd and meson resolve this: the
meson 'install-tests' option installs the unit-test binaries and a
run-unit-tests.py runner under ${prefix}/lib/systemd/tests, and
run-unit-tests.py already emits PASS:/SKIP: results per test.
Add a 'tests' PACKAGECONFIG gated on PTEST_ENABLED that sets -Dtests
and -Dinstall-tests and pulls in python3-pefile-native (needed to build
the boot hwids test). do_install_ptest relocates the installed tests
into ${PTEST_PATH} and drops the mkosi/integration-tests harness (which
needs a booted system). A run-ptest wrapper drives run-unit-tests.py,
and systemd is registered in ptest-packagelists.inc.
The test/units integration tests, which require a booted system, are
out of scope here and can be addressed separately.
Verified on oe-core master (261.2, qemux86-64): with ptest enabled, 342
unit-test binaries plus run-unit-tests.py install into ${PTEST_PATH} and
systemd-ptest packages cleanly with no QA errors.
[YOCTO #16386]
Signed-off-by: Himani Ramesh Barde <HimaniRamesh.Barde@windriver.com>
---
v3:
- Move PACKAGECONFIG[tests] next to the other PACKAGECONFIG entries and
the PTEST_ENABLED conditional into the PACKAGECONFIG ??= block (Jose
Quaresma).
- Drop the inline comment; details are in the commit message (Jose
Quaresma).
- Fix the SRC_URI run-ptest indentation (Jose Quaresma).
- Wrap the commit message at ~72 columns.
v2:
- Gate tests via a PACKAGECONFIG on PTEST_ENABLED (Jose Quaresma).
- Register systemd in ptest-packagelists.inc, fixing the missing-ptest
QA error seen on the autobuilder (Khem Raj, Richard Purdie).
- Add python3-pefile-native dependency (fixes boot hwids test build
failure). Exclude the mkosi/integration harness from the ptest package.
meta/conf/distro/include/ptest-packagelists.inc | 1 +
meta/recipes-core/systemd/systemd/run-ptest | 11 +++++++++++
meta/recipes-core/systemd/systemd_261.2.bb | 17 ++++++++++++++++-
3 files changed, 28 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-core/systemd/systemd/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index ce6c0a2d76..4697843555 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -146,6 +146,7 @@ PTESTS_SLOW = "\
python3-numpy \
python3-xmltodict \
strace \
+ systemd \
tar \
tcl \
tcl8 \
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
new file mode 100755
index 0000000000..b2204b96d4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Run systemd's installed meson unit tests in ptest format.
+# systemd's -Dinstall-tests=true installs run-unit-tests.py plus the
+# unit-tests/test-* binaries; run-unit-tests.py already emits PASS:/SKIP: lines.
+set -u
+here="$(cd "$(dirname "$0")" && pwd)"
+for cand in "$here/run-unit-tests.py" "$here/tests/run-unit-tests.py" /usr/lib/systemd/tests/run-unit-tests.py; do
+ [ -f "$cand" ] && { python3 "$cand" 2>&1; exit 0; }
+done
+echo "FAIL: systemd-ptest (run-unit-tests.py not found)"
+exit 1
diff --git a/meta/recipes-core/systemd/systemd_261.2.bb b/meta/recipes-core/systemd/systemd_261.2.bb
index 80e1aa07d1..43c19c5edc 100644
--- a/meta/recipes-core/systemd/systemd_261.2.bb
+++ b/meta/recipes-core/systemd/systemd_261.2.bb
@@ -9,7 +9,7 @@ DEPENDS:append:libc-musl = " libucontext"
SECTION = "base/shell"
-inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives systemd gettext bash-completion manpages features_check mime
+inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives systemd gettext bash-completion manpages features_check mime ptest
# unmerged-usr support is deprecated upstream, taints the system and will be
# removed in the near future. Fail the build if it is not enabled.
@@ -37,6 +37,7 @@ SRC_URI += " \
file://systemd-pager.sh \
file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
file://0003-Do-not-create-var-log-README.patch \
+ file://run-ptest \
"
PAM_PLUGINS = " \
@@ -51,6 +52,7 @@ PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
link-udev-shared \
backlight \
binfmt \
@@ -188,6 +190,7 @@ PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,initsc
PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false"
PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[tests] = "-Dtests=unsafe -Dinstall-tests=true,-Dtests=false -Dinstall-tests=false,python3-pefile-native"
# When enabled use reproducible build timestamp if set as time epoch,
# or build time if not. When disabled, time epoch is unset.
def build_epoch(d):
@@ -937,3 +940,15 @@ python do_warn_musl() {
bb.warn("Using systemd with musl is experimental, see https://github.com/systemd/systemd/blob/9ca4334/NEWS#L524 for details")
}
addtask warn_musl before do_configure
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+ if [ -d ${D}${prefix}/lib/systemd/tests ]; then
+ mv ${D}${prefix}/lib/systemd/tests/* ${D}${PTEST_PATH}/
+ rm -rf ${D}${prefix}/lib/systemd/tests
+ fi
+ rm -rf ${D}${PTEST_PATH}/mkosi ${D}${PTEST_PATH}/integration-tests
+}
+
+RDEPENDS:${PN}-ptest += "python3-core bash"
+INSANE_SKIP:${PN}-ptest += "dev-deps debug-files"
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core][PATCH v3] systemd: re-enable ptest support
2026-09-07 11:45 [OE-core][PATCH v3] systemd: re-enable ptest support Himani Ramesh Barde
@ 2026-09-08 6:59 ` Mathieu Dubois-Briand
2026-09-08 7:00 ` Mathieu Dubois-Briand
2026-09-08 7:46 ` Jose Quaresma
1 sibling, 1 reply; 5+ messages in thread
From: Mathieu Dubois-Briand @ 2026-09-08 6:59 UTC (permalink / raw)
To: HimaniRamesh.Barde, openembedded-core
Cc: Randy.MacLeod, ross.burton, jose.quaresma, raj.khem,
richard.purdie, Shiva.Komati
On Mon Sep 7, 2026 at 1:45 PM CEST, Himani Ramesh Barde via lists.openembedded.org wrote:
> ptest support for systemd was dropped in 2018 (commit 906230a73b3c)
> when the recipe switched to meson, as there was no easy way to install
> and run the test suite. Current systemd and meson resolve this: the
> meson 'install-tests' option installs the unit-test binaries and a
> run-unit-tests.py runner under ${prefix}/lib/systemd/tests, and
> run-unit-tests.py already emits PASS:/SKIP: results per test.
>
> Add a 'tests' PACKAGECONFIG gated on PTEST_ENABLED that sets -Dtests
> and -Dinstall-tests and pulls in python3-pefile-native (needed to build
> the boot hwids test). do_install_ptest relocates the installed tests
> into ${PTEST_PATH} and drops the mkosi/integration-tests harness (which
> needs a booted system). A run-ptest wrapper drives run-unit-tests.py,
> and systemd is registered in ptest-packagelists.inc.
>
> The test/units integration tests, which require a booted system, are
> out of scope here and can be addressed separately.
>
> Verified on oe-core master (261.2, qemux86-64): with ptest enabled, 342
> unit-test binaries plus run-unit-tests.py install into ${PTEST_PATH} and
> systemd-ptest packages cleanly with no QA errors.
>
> [YOCTO #16386]
>
> Signed-off-by: Himani Ramesh Barde <HimaniRamesh.Barde@windriver.com>
> ---
Hi Himani Ramesh,
This is failing on the autobuilder, as we are running ptests using the
poky distro, but poky does not have systemd DISTRO_FEATURES. I'm not
sure how we can fix this, but we might need to hack a bit.
Do you know how it was working before it was dropped in 2018?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core][PATCH v3] systemd: re-enable ptest support
2026-09-08 6:59 ` Mathieu Dubois-Briand
@ 2026-09-08 7:00 ` Mathieu Dubois-Briand
2026-09-08 7:39 ` Jose Quaresma
0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Dubois-Briand @ 2026-09-08 7:00 UTC (permalink / raw)
To: HimaniRamesh.Barde, openembedded-core
Cc: Randy.MacLeod, ross.burton, jose.quaresma, raj.khem,
richard.purdie, Shiva.Komati
On Tue Sep 8, 2026 at 8:59 AM CEST, Mathieu Dubois-Briand wrote:
> On Mon Sep 7, 2026 at 1:45 PM CEST, Himani Ramesh Barde via lists.openembedded.org wrote:
>> ptest support for systemd was dropped in 2018 (commit 906230a73b3c)
>> when the recipe switched to meson, as there was no easy way to install
>> and run the test suite. Current systemd and meson resolve this: the
>> meson 'install-tests' option installs the unit-test binaries and a
>> run-unit-tests.py runner under ${prefix}/lib/systemd/tests, and
>> run-unit-tests.py already emits PASS:/SKIP: results per test.
>>
>> Add a 'tests' PACKAGECONFIG gated on PTEST_ENABLED that sets -Dtests
>> and -Dinstall-tests and pulls in python3-pefile-native (needed to build
>> the boot hwids test). do_install_ptest relocates the installed tests
>> into ${PTEST_PATH} and drops the mkosi/integration-tests harness (which
>> needs a booted system). A run-ptest wrapper drives run-unit-tests.py,
>> and systemd is registered in ptest-packagelists.inc.
>>
>> The test/units integration tests, which require a booted system, are
>> out of scope here and can be addressed separately.
>>
>> Verified on oe-core master (261.2, qemux86-64): with ptest enabled, 342
>> unit-test binaries plus run-unit-tests.py install into ${PTEST_PATH} and
>> systemd-ptest packages cleanly with no QA errors.
>>
>> [YOCTO #16386]
>>
>> Signed-off-by: Himani Ramesh Barde <HimaniRamesh.Barde@windriver.com>
>> ---
>
> Hi Himani Ramesh,
>
> This is failing on the autobuilder, as we are running ptests using the
> poky distro, but poky does not have systemd DISTRO_FEATURES. I'm not
> sure how we can fix this, but we might need to hack a bit.
>
> Do you know how it was working before it was dropped in 2018?
>
> Thanks,
> Mathieu
Sorry, I forgot to add the log:
ERROR: Nothing RPROVIDES 'systemd-ptest' (but virtual:mcextend:systemd:/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/layers/openembedded-core/meta/recipes-core/images/core-image-ptest.bb RDEPENDS on or otherwise requires it)
systemd RPROVIDES systemd-ptest but was skipped: using DISTRO 'poky', which is missing required DISTRO_FEATURES: 'systemd usrmerge'
NOTE: Runtime target 'systemd-ptest' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['systemd-ptest']
NOTE: Runtime target 'core-image-ptest-all' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['core-image-ptest-all', 'core-image-ptest-systemd', 'systemd-ptest']
NOTE: Runtime target 'core-image-ptest-all-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['core-image-ptest-all-dev', 'core-image-ptest-systemd', 'systemd-ptest']
ERROR: Nothing RPROVIDES 'core-image-ptest-systemd'
No eligible RPROVIDERs exist for 'core-image-ptest-systemd'
NOTE: Runtime target 'core-image-ptest-systemd' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['core-image-ptest-systemd']
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4482
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4509
https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/1157
https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1137
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core][PATCH v3] systemd: re-enable ptest support
2026-09-08 7:00 ` Mathieu Dubois-Briand
@ 2026-09-08 7:39 ` Jose Quaresma
0 siblings, 0 replies; 5+ messages in thread
From: Jose Quaresma @ 2026-09-08 7:39 UTC (permalink / raw)
To: mathieu.dubois-briand
Cc: HimaniRamesh.Barde, openembedded-core, Randy.MacLeod, ross.burton,
raj.khem, richard.purdie, Shiva.Komati
[-- Attachment #1: Type: text/plain, Size: 4295 bytes --]
On Tue, Sep 8, 2026 at 8:00 AM Mathieu Dubois-Briand via
lists.openembedded.org <mathieu.dubois-briand=
bootlin.com@lists.openembedded.org> wrote:
> On Tue Sep 8, 2026 at 8:59 AM CEST, Mathieu Dubois-Briand wrote:
> > On Mon Sep 7, 2026 at 1:45 PM CEST, Himani Ramesh Barde via
> lists.openembedded.org wrote:
> >> ptest support for systemd was dropped in 2018 (commit 906230a73b3c)
> >> when the recipe switched to meson, as there was no easy way to install
> >> and run the test suite. Current systemd and meson resolve this: the
> >> meson 'install-tests' option installs the unit-test binaries and a
> >> run-unit-tests.py runner under ${prefix}/lib/systemd/tests, and
> >> run-unit-tests.py already emits PASS:/SKIP: results per test.
> >>
> >> Add a 'tests' PACKAGECONFIG gated on PTEST_ENABLED that sets -Dtests
> >> and -Dinstall-tests and pulls in python3-pefile-native (needed to build
> >> the boot hwids test). do_install_ptest relocates the installed tests
> >> into ${PTEST_PATH} and drops the mkosi/integration-tests harness (which
> >> needs a booted system). A run-ptest wrapper drives run-unit-tests.py,
> >> and systemd is registered in ptest-packagelists.inc.
> >>
> >> The test/units integration tests, which require a booted system, are
> >> out of scope here and can be addressed separately.
> >>
> >> Verified on oe-core master (261.2, qemux86-64): with ptest enabled, 342
> >> unit-test binaries plus run-unit-tests.py install into ${PTEST_PATH} and
> >> systemd-ptest packages cleanly with no QA errors.
> >>
> >> [YOCTO #16386]
> >>
> >> Signed-off-by: Himani Ramesh Barde <HimaniRamesh.Barde@windriver.com>
> >> ---
> >
> > Hi Himani Ramesh,
> >
> > This is failing on the autobuilder, as we are running ptests using the
> > poky distro, but poky does not have systemd DISTRO_FEATURES. I'm not
> > sure how we can fix this, but we might need to hack a bit.
> >
> > Do you know how it was working before it was dropped in 2018?
> >
> > Thanks,
> > Mathieu
>
> Sorry, I forgot to add the log:
>
> ERROR: Nothing RPROVIDES 'systemd-ptest' (but
> virtual:mcextend:systemd:/srv/pokybuild/yocto-worker/qemuarm64-ptest/build/layers/openembedded-core/meta/recipes-core/images/
> core-image-ptest.bb RDEPENDS on or otherwise requires it)
> systemd RPROVIDES systemd-ptest but was skipped: using DISTRO 'poky',
> which is missing required DISTRO_FEATURES: 'systemd usrmerge'
> NOTE: Runtime target 'systemd-ptest' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['systemd-ptest']
> NOTE: Runtime target 'core-image-ptest-all' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['core-image-ptest-all',
> 'core-image-ptest-systemd', 'systemd-ptest']
> NOTE: Runtime target 'core-image-ptest-all-dev' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['core-image-ptest-all-dev',
> 'core-image-ptest-systemd', 'systemd-ptest']
> ERROR: Nothing RPROVIDES 'core-image-ptest-systemd'
> No eligible RPROVIDERs exist for 'core-image-ptest-systemd'
> NOTE: Runtime target 'core-image-ptest-systemd' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['core-image-ptest-systemd']
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4482
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4509
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/109/builds/1157
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1137
I believe this can be fixed in
meta/conf/distro/include/ptest-packagelists.inc with:
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}
Jose
>
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#245333):
> https://lists.openembedded.org/g/openembedded-core/message/245333
> Mute This Topic: https://lists.openembedded.org/mt/121127018/10043485
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> jose.quaresma@oss.qualcomm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 6565 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core][PATCH v3] systemd: re-enable ptest support
2026-09-07 11:45 [OE-core][PATCH v3] systemd: re-enable ptest support Himani Ramesh Barde
2026-09-08 6:59 ` Mathieu Dubois-Briand
@ 2026-09-08 7:46 ` Jose Quaresma
1 sibling, 0 replies; 5+ messages in thread
From: Jose Quaresma @ 2026-09-08 7:46 UTC (permalink / raw)
To: Himani Ramesh Barde
Cc: openembedded-core, Randy.MacLeod, ross.burton, raj.khem,
richard.purdie, Shiva.Komati
[-- Attachment #1: Type: text/plain, Size: 6759 bytes --]
Hi Himani,
The code indentation has not yet been fixed and It has a mix of spaces and
tabs.
You can see this with 'git format-patch -1' and look at the patch before
sending it.
Sorry for bothering you with these petty things.
Jose
On Mon, Sep 7, 2026 at 12:45 PM Himani Ramesh Barde <
HimaniRamesh.Barde@windriver.com> wrote:
> ptest support for systemd was dropped in 2018 (commit 906230a73b3c)
> when the recipe switched to meson, as there was no easy way to install
> and run the test suite. Current systemd and meson resolve this: the
> meson 'install-tests' option installs the unit-test binaries and a
> run-unit-tests.py runner under ${prefix}/lib/systemd/tests, and
> run-unit-tests.py already emits PASS:/SKIP: results per test.
>
> Add a 'tests' PACKAGECONFIG gated on PTEST_ENABLED that sets -Dtests
> and -Dinstall-tests and pulls in python3-pefile-native (needed to build
> the boot hwids test). do_install_ptest relocates the installed tests
> into ${PTEST_PATH} and drops the mkosi/integration-tests harness (which
> needs a booted system). A run-ptest wrapper drives run-unit-tests.py,
> and systemd is registered in ptest-packagelists.inc.
>
> The test/units integration tests, which require a booted system, are
> out of scope here and can be addressed separately.
>
> Verified on oe-core master (261.2, qemux86-64): with ptest enabled, 342
> unit-test binaries plus run-unit-tests.py install into ${PTEST_PATH} and
> systemd-ptest packages cleanly with no QA errors.
>
> [YOCTO #16386]
>
> Signed-off-by: Himani Ramesh Barde <HimaniRamesh.Barde@windriver.com>
> ---
> v3:
> - Move PACKAGECONFIG[tests] next to the other PACKAGECONFIG entries and
> the PTEST_ENABLED conditional into the PACKAGECONFIG ??= block (Jose
> Quaresma).
> - Drop the inline comment; details are in the commit message (Jose
> Quaresma).
> - Fix the SRC_URI run-ptest indentation (Jose Quaresma).
> - Wrap the commit message at ~72 columns.
>
> v2:
> - Gate tests via a PACKAGECONFIG on PTEST_ENABLED (Jose Quaresma).
> - Register systemd in ptest-packagelists.inc, fixing the missing-ptest
> QA error seen on the autobuilder (Khem Raj, Richard Purdie).
> - Add python3-pefile-native dependency (fixes boot hwids test build
> failure). Exclude the mkosi/integration harness from the ptest package.
> meta/conf/distro/include/ptest-packagelists.inc | 1 +
> meta/recipes-core/systemd/systemd/run-ptest | 11 +++++++++++
> meta/recipes-core/systemd/systemd_261.2.bb | 17 ++++++++++++++++-
> 3 files changed, 28 insertions(+), 1 deletion(-)
> create mode 100755 meta/recipes-core/systemd/systemd/run-ptest
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc
> b/meta/conf/distro/include/ptest-packagelists.inc
> index ce6c0a2d76..4697843555 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -146,6 +146,7 @@ PTESTS_SLOW = "\
> python3-numpy \
> python3-xmltodict \
> strace \
> + systemd \
> tar \
> tcl \
> tcl8 \
> diff --git a/meta/recipes-core/systemd/systemd/run-ptest
> b/meta/recipes-core/systemd/systemd/run-ptest
> new file mode 100755
> index 0000000000..b2204b96d4
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/run-ptest
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +# Run systemd's installed meson unit tests in ptest format.
> +# systemd's -Dinstall-tests=true installs run-unit-tests.py plus the
> +# unit-tests/test-* binaries; run-unit-tests.py already emits PASS:/SKIP:
> lines.
> +set -u
> +here="$(cd "$(dirname "$0")" && pwd)"
> +for cand in "$here/run-unit-tests.py" "$here/tests/run-unit-tests.py"
> /usr/lib/systemd/tests/run-unit-tests.py; do
> + [ -f "$cand" ] && { python3 "$cand" 2>&1; exit 0; }
> +done
> +echo "FAIL: systemd-ptest (run-unit-tests.py not found)"
> +exit 1
> diff --git a/meta/recipes-core/systemd/systemd_261.2.bb
> b/meta/recipes-core/systemd/systemd_261.2.bb
> index 80e1aa07d1..43c19c5edc 100644
> --- a/meta/recipes-core/systemd/systemd_261.2.bb
> +++ b/meta/recipes-core/systemd/systemd_261.2.bb
> @@ -9,7 +9,7 @@ DEPENDS:append:libc-musl = " libucontext"
>
> SECTION = "base/shell"
>
> -inherit useradd pkgconfig meson perlnative update-rc.d
> update-alternatives systemd gettext bash-completion manpages features_check
> mime
> +inherit useradd pkgconfig meson perlnative update-rc.d
> update-alternatives systemd gettext bash-completion manpages features_check
> mime ptest
>
> # unmerged-usr support is deprecated upstream, taints the system and will
> be
> # removed in the near future. Fail the build if it is not enabled.
> @@ -37,6 +37,7 @@ SRC_URI += " \
> file://systemd-pager.sh \
>
> file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
> file://0003-Do-not-create-var-log-README.patch \
> + file://run-ptest \
> "
>
> PAM_PLUGINS = " \
> @@ -51,6 +52,7 @@ PACKAGECONFIG ??= " \
> ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump
> elfutils', '', d)} \
> ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
> ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
> + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests',
> '', d)} \
> link-udev-shared \
> backlight \
> binfmt \
> @@ -188,6 +190,7 @@ PACKAGECONFIG[selinux] =
> "-Dselinux=enabled,-Dselinux=disabled,libselinux,initsc
> PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
> PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false"
> PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
> +PACKAGECONFIG[tests] = "-Dtests=unsafe -Dinstall-tests=true,-Dtests=false
> -Dinstall-tests=false,python3-pefile-native"
> # When enabled use reproducible build timestamp if set as time epoch,
> # or build time if not. When disabled, time epoch is unset.
> def build_epoch(d):
> @@ -937,3 +940,15 @@ python do_warn_musl() {
> bb.warn("Using systemd with musl is experimental, see
> https://github.com/systemd/systemd/blob/9ca4334/NEWS#L524 for details")
> }
> addtask warn_musl before do_configure
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}
> + if [ -d ${D}${prefix}/lib/systemd/tests ]; then
> + mv ${D}${prefix}/lib/systemd/tests/* ${D}${PTEST_PATH}/
> + rm -rf ${D}${prefix}/lib/systemd/tests
> + fi
> + rm -rf ${D}${PTEST_PATH}/mkosi ${D}${PTEST_PATH}/integration-tests
> +}
> +
> +RDEPENDS:${PN}-ptest += "python3-core bash"
> +INSANE_SKIP:${PN}-ptest += "dev-deps debug-files"
> --
> 2.54.0
>
>
[-- Attachment #2: Type: text/html, Size: 8528 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-08 7:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 11:45 [OE-core][PATCH v3] systemd: re-enable ptest support Himani Ramesh Barde
2026-09-08 6:59 ` Mathieu Dubois-Briand
2026-09-08 7:00 ` Mathieu Dubois-Briand
2026-09-08 7:39 ` Jose Quaresma
2026-09-08 7:46 ` Jose Quaresma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox