From 7579becc3b1b82176eafdd39ae98972602df2d0b Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Fri, 17 Oct 2025 14:54:41 +0200 Subject: [PATCH] fmt: fix ptests The recipe has inherited the ptest class, however it did not install not execute any tests. This change installs the tests and add a script to execute them. The tests are quick, execution takes single digit seconds. Signed-off-by: Gyorgy Sarvari --- meta-oe/recipes-support/fmt/fmt/run-ptest | 5 +++++ meta-oe/recipes-support/fmt/fmt_8.1.1.bb | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/fmt/fmt/run-ptest diff --git a/meta-oe/recipes-support/fmt/fmt/run-ptest b/meta-oe/recipes-support/fmt/fmt/run-ptest new file mode 100644 index 0000000000..a069e4543c --- /dev/null +++ b/meta-oe/recipes-support/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-oe/recipes-support/fmt/fmt_8.1.1.bb b/meta-oe/recipes-support/fmt/fmt_8.1.1.bb index c53dd38901..54b8fd3d9e 100644 --- a/meta-oe/recipes-support/fmt/fmt_8.1.1.bb +++ b/meta-oe/recipes-support/fmt/fmt_8.1.1.bb @@ -4,7 +4,8 @@ HOMEPAGE = "https://fmt.dev" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=af88d758f75f3c5c48a967501f24384b" -SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https" +SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https \ + file://run-ptest" SRCREV = "b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9" S = "${WORKDIR}/git" @@ -13,5 +14,12 @@ inherit cmake inherit 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"