| Message ID | 20251021190509.300000-1-skandigraun@gmail.com |
|---|---|
| State | Accepted, archived |
| Commit | bd233792a0e57444acc88bee907b7a98598e7112 |
| Headers | show |
| Series | fmt: add ptest support | expand |
On 21 Oct 2025, at 20:05, Gyorgy Sarvari via lists.openembedded.org <skandigraun=gmail.com@lists.openembedded.org> wrote: > +++ b/meta/recipes-devtools/fmt/fmt/run-ptest > @@ -0,0 +1,5 @@ > +#!/bin/sh > + > +for t in `ls ./*-test`; do Being really picky, but POSIX says to use $(…) instead of `…`. Also, you don’t need to do a ls here: for t in *-test is sufficient. > +do_install_ptest(){ > + for t in `ls ${B}/bin/*-test`; do Same here, for t in ${B}/bin/*-test works. Ross
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index e6e725bd25..06d113e264 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -19,6 +19,7 @@ PTESTS_FAST = "\ expect \ findutils \ flex \ + fmt \ gawk \ gdbm \ gdk-pixbuf \ diff --git a/meta/recipes-devtools/fmt/fmt/run-ptest b/meta/recipes-devtools/fmt/fmt/run-ptest new file mode 100644 index 0000000000..a069e4543c --- /dev/null +++ b/meta/recipes-devtools/fmt/fmt/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +for t in `ls ./*-test`; do + ./$t && echo PASS: $t || echo FAIL: $t +done diff --git a/meta/recipes-devtools/fmt/fmt_11.2.0.bb b/meta/recipes-devtools/fmt/fmt_11.2.0.bb index fd5dc0c4ab..06ba523ada 100644 --- a/meta/recipes-devtools/fmt/fmt_11.2.0.bb +++ b/meta/recipes-devtools/fmt/fmt_11.2.0.bb @@ -7,11 +7,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729" SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https;tag=${PV}\ file://0001-Workaround-an-ABI-issue-in-spdlog.patch \ file://0001-Fix-compilation-on-clang-21-libc-21-4477.patch \ + file://run-ptest \ " SRCREV = "40626af88bd7df9a5fb80be7b25ac85b122d6c21" -inherit cmake +inherit cmake ptest EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON" +EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DFMT_TEST=ON', '', d)}" + +do_install_ptest(){ + for t in `ls ${B}/bin/*-test`; do + install $t ${D}${PTEST_PATH}/ + done +} BBCLASSEXTEND = "native nativesdk"
Execution takes around a second. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> --- meta/conf/distro/include/ptest-packagelists.inc | 1 + meta/recipes-devtools/fmt/fmt/run-ptest | 5 +++++ meta/recipes-devtools/fmt/fmt_11.2.0.bb | 10 +++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/fmt/fmt/run-ptest