diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2024-10-12 18:01:46 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-10-17 14:07:45 -0700 |
commit | 8917528948c93a9c933bf7d2c9110ba2cade43cc (patch) | |
tree | fc5a57ebd79ea23b1eff4baad3b26c4f99d7b05f | |
parent | 3490ba33844a2ed0024bfff7445a32276e2fcfb2 (diff) | |
download | meta-openembedded-8917528948c93a9c933bf7d2c9110ba2cade43cc.tar.gz |
tomlplusplus: Add ptest support
# ./run-ptest
PASS: tomlplusplus_odr_test
PASS: tomlplusplus_tests
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rwxr-xr-x | meta-oe/recipes-devtools/tomlplusplus/files/run-ptest | 12 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/tomlplusplus/tomlplusplus_git.bb | 15 |
2 files changed, 25 insertions, 2 deletions
diff --git a/meta-oe/recipes-devtools/tomlplusplus/files/run-ptest b/meta-oe/recipes-devtools/tomlplusplus/files/run-ptest new file mode 100755 index 0000000000..4f682c5eb2 --- /dev/null +++ b/meta-oe/recipes-devtools/tomlplusplus/files/run-ptest | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests | ||
4 | for atest in tomlplusplus_* ; do | ||
5 | rm -rf tests.log | ||
6 | ./${atest} > tests.log 2>&1 | ||
7 | if [ $? = 0 ] ; then | ||
8 | echo "PASS: ${atest}" | ||
9 | else | ||
10 | echo "FAIL: ${atest}" | ||
11 | fi | ||
12 | done | ||
diff --git a/meta-oe/recipes-devtools/tomlplusplus/tomlplusplus_git.bb b/meta-oe/recipes-devtools/tomlplusplus/tomlplusplus_git.bb index 0e8202bdcc..245c309a2e 100644 --- a/meta-oe/recipes-devtools/tomlplusplus/tomlplusplus_git.bb +++ b/meta-oe/recipes-devtools/tomlplusplus/tomlplusplus_git.bb | |||
@@ -3,7 +3,9 @@ HOMEPAGE = "https://github.com/marzer/tomlplusplus" | |||
3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=90960f22c10049c117d56ed2ee5ee167" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=90960f22c10049c117d56ed2ee5ee167" |
5 | 5 | ||
6 | SRC_URI = "git://github.com/marzer/tomlplusplus.git;protocol=https;branch=master" | 6 | SRC_URI = "git://github.com/marzer/tomlplusplus.git;protocol=https;branch=master \ |
7 | file://run-ptest \ | ||
8 | " | ||
7 | 9 | ||
8 | PV = "3.4.0" | 10 | PV = "3.4.0" |
9 | SRCREV = "30172438cee64926dc41fdd9c11fb3ba5b2ba9de" | 11 | SRCREV = "30172438cee64926dc41fdd9c11fb3ba5b2ba9de" |
@@ -11,4 +13,13 @@ S = "${WORKDIR}/git" | |||
11 | 13 | ||
12 | DEPENDS = "cmake-native" | 14 | DEPENDS = "cmake-native" |
13 | 15 | ||
14 | inherit meson | 16 | inherit meson ptest |
17 | |||
18 | EXTRA_OEMESON += "-Dbuild_tests=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "true", "false", d)} \ | ||
19 | " | ||
20 | |||
21 | do_install_ptest () { | ||
22 | install -d ${D}${PTEST_PATH}/tests | ||
23 | cp ${B}/tests/tomlplusplus_odr_test ${D}${PTEST_PATH}/tests | ||
24 | cp ${B}/tests/tomlplusplus_tests ${D}${PTEST_PATH}/tests | ||
25 | } | ||