diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-17 13:21:04 +0200 |
|---|---|---|
| committer | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-10-20 08:52:52 +0200 |
| commit | c1171b8db7ab8afae52875eadcc3a57713d124c0 (patch) | |
| tree | 9b923c505347a18a4f34ab8125ad4831a6cb5fe3 /meta-oe/recipes-support/cli11 | |
| parent | 1918af644e370b3d20e9cb3cb712fb834033d047 (diff) | |
| download | meta-openembedded-c1171b8db7ab8afae52875eadcc3a57713d124c0.tar.gz | |
cli11: fix ptests
The recipe inherits the ptest class, however it doesn't install
the actual tests, nor executes them.
This change installs the tests, and add a run-ptest script to
execute them also.
The tests are fairly quick, it takes single digit seconds on my
machine to execute.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/cli11')
| -rw-r--r-- | meta-oe/recipes-support/cli11/cli11/run-ptest | 5 | ||||
| -rw-r--r-- | meta-oe/recipes-support/cli11/cli11_1.9.1.bb | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/cli11/cli11/run-ptest b/meta-oe/recipes-support/cli11/cli11/run-ptest new file mode 100644 index 0000000000..ef37d44783 --- /dev/null +++ b/meta-oe/recipes-support/cli11/cli11/run-ptest | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | cd tests | ||
| 3 | for t in `ls ./*Test`; do | ||
| 4 | ./$t && echo PASS: $t || echo FAIL: $t | ||
| 5 | done | ||
diff --git a/meta-oe/recipes-support/cli11/cli11_1.9.1.bb b/meta-oe/recipes-support/cli11/cli11_1.9.1.bb index 7de3335abd..c8a2f7358b 100644 --- a/meta-oe/recipes-support/cli11/cli11_1.9.1.bb +++ b/meta-oe/recipes-support/cli11/cli11_1.9.1.bb | |||
| @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b73927b18d5c6cd8d2ed28a6ad539733" | |||
| 6 | SRCREV = "5cb3efabce007c3a0230e4cc2e27da491c646b6c" | 6 | SRCREV = "5cb3efabce007c3a0230e4cc2e27da491c646b6c" |
| 7 | PV .= "+git${SRCPV}" | 7 | PV .= "+git${SRCPV}" |
| 8 | 8 | ||
| 9 | SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=v1;protocol=https" | 9 | SRC_URI += "gitsm://github.com/CLIUtils/CLI11;branch=v1;protocol=https \ |
| 10 | file://run-ptest" | ||
| 10 | 11 | ||
| 11 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
| 12 | 13 | ||
| @@ -15,3 +16,11 @@ inherit ptest | |||
| 15 | 16 | ||
| 16 | # cli11 is a header only C++ library, so the main package will be empty. | 17 | # cli11 is a header only C++ library, so the main package will be empty. |
| 17 | RDEPENDS:${PN}-dev = "" | 18 | RDEPENDS:${PN}-dev = "" |
| 19 | RDEPENDS:${PN}-ptest = "" | ||
| 20 | |||
| 21 | do_install_ptest(){ | ||
| 22 | install -d ${D}${PTEST_PATH}/tests | ||
| 23 | for t in `ls ${B}/tests/*Test`; do | ||
| 24 | install $t ${D}${PTEST_PATH}/tests/ | ||
| 25 | done | ||
| 26 | } | ||
