]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fmt: add ptest support
authorGyorgy Sarvari <skandigraun@gmail.com>
Tue, 21 Oct 2025 19:05:09 +0000 (21:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Oct 2025 16:58:15 +0000 (16:58 +0000)
Execution takes around a second.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-devtools/fmt/fmt/run-ptest [new file with mode: 0644]
meta/recipes-devtools/fmt/fmt_11.2.0.bb

index e6e725bd251b78cc130e913fc06fe3da48a36ac4..06d113e264c19338ea0cf1a92ff56ba7814b3abb 100644 (file)
@@ -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 (file)
index 0000000..a069e45
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for t in `ls ./*-test`; do
+       ./$t && echo PASS: $t || echo FAIL: $t
+done
index fd5dc0c4ab7acfd0f96159e45ca1af56bba9397c..06ba523ada546367f29ee69c743aefc7bd68af77 100644 (file)
@@ -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"