mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
uriparser: add ptest support
It takes about a second to execute. The test suite is covered by a different license (lgpl 2.1+) than the main recipe (3-clause bsd). Sample output: root@qemux86-64:~# ptest-runner START: ptest-runner 2025-12-22T19:34 BEGIN: /usr/lib/uriparser/ptest [==========] Running 407 tests from 35 test suites. [----------] Global test environment set-up. [----------] 14 tests from CopyUriSuite PASS: CopyUriSuite.ErrorSourceUriNull PASS: CopyUriSuite.ErrorDestUriNull [...many lines...] PASS: SetUserInfo.UriWithoutHostNonNullRejected [----------] 2 tests from VersionSuite PASS: VersionSuite.EnsureVersionDefinesInSync PASS: VersionSuite.EnsureRuntimeVersionAsExpected [----------] Global test environment tear-down [==========] 407 tests from 35 test suites ran. [ PASSED ] 407 tests. DURATION: 1 END: /usr/lib/uriparser/ptest 2025-12-22T19:34 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
eb7b920572
commit
ae5a3b889d
@ -59,6 +59,7 @@ PTESTS_FAST_META_OE = "\
|
|||||||
zeromq \
|
zeromq \
|
||||||
cjson \
|
cjson \
|
||||||
libplist \
|
libplist \
|
||||||
|
uriparser \
|
||||||
"
|
"
|
||||||
PTESTS_FAST_META_OE:append:x86 = " mcelog"
|
PTESTS_FAST_META_OE:append:x86 = " mcelog"
|
||||||
PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
|
PTESTS_FAST_META_OE:append:x86-64 = " mcelog"
|
||||||
|
|||||||
2
meta-oe/recipes-support/uriparser/uriparser/run-ptest
Normal file
2
meta-oe/recipes-support/uriparser/uriparser/run-ptest
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
./testrunner --gtest_print_time=0 | sed -E '/^\[ RUN/d ; s/\[ OK \]/PASS: / ; s/\[ DISABLED \]/SKIP: / ; s/\[ FAILED \]/FAIL: /'
|
||||||
@ -1,16 +1,30 @@
|
|||||||
SUMMARY = "RFC 3986 compliant URI parsing library"
|
SUMMARY = "RFC 3986 compliant URI parsing library"
|
||||||
HOMEPAGE = "https://uriparser.github.io"
|
HOMEPAGE = "https://uriparser.github.io"
|
||||||
|
|
||||||
LICENSE = "BSD-3-Clause"
|
LICENSE = "BSD-3-Clause & LGPL-2.1-or-later"
|
||||||
LIC_FILES_CHKSUM = "file://src/COPYING;md5=fcc5a53146c2401f4b4f6a3bdf3f0168"
|
LICENSE:${PN} = "BSD-3-Clause"
|
||||||
|
LICENSE:${PN}-ptest = "LGPL-2.1-or-later"
|
||||||
|
|
||||||
SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${BP}/${BP}.tar.gz"
|
LIC_FILES_CHKSUM = "file://src/COPYING;md5=fcc5a53146c2401f4b4f6a3bdf3f0168 \
|
||||||
|
file://test/COPYING;md5=b9e6430863a3ea22cf4b0a8518279ed3"
|
||||||
|
|
||||||
|
SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${BP}/${BP}.tar.gz \
|
||||||
|
file://run-ptest"
|
||||||
SRC_URI[sha256sum] = "291f25264a5c025005b1bc39de3c029e6a6ca0a8d6cfa5e61cb5b03702c0884d"
|
SRC_URI[sha256sum] = "291f25264a5c025005b1bc39de3c029e6a6ca0a8d6cfa5e61cb5b03702c0884d"
|
||||||
|
|
||||||
inherit cmake github-releases
|
inherit cmake github-releases ptest
|
||||||
|
|
||||||
UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"
|
UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"
|
||||||
|
|
||||||
EXTRA_OECMAKE += "-DURIPARSER_BUILD_DOCS:BOOL=OFF -DURIPARSER_BUILD_TESTS:BOOL=OFF"
|
PACKAGECONFIG = "${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)} "
|
||||||
|
PACKAGECONFIG[test] = "-DURIPARSER_BUILD_TESTS:BOOL=ON, -DURIPARSER_BUILD_TESTS:BOOL=OFF, googletest"
|
||||||
|
|
||||||
|
EXTRA_OECMAKE += " \
|
||||||
|
-DURIPARSER_BUILD_DOCS:BOOL=OFF \
|
||||||
|
"
|
||||||
|
|
||||||
|
do_install_ptest(){
|
||||||
|
install ${B}/testrunner ${D}${PTEST_PATH}
|
||||||
|
}
|
||||||
|
|
||||||
BBCLASSEXTEND += "native"
|
BBCLASSEXTEND += "native"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user