diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-12-22 20:41:42 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-12-22 18:20:58 -0800 |
| commit | ae5a3b889d9b6d1569e787368267d019ca82613c (patch) | |
| tree | 714fbfc5839a92bc8e9edcc4d2ceac6039845331 /meta-oe | |
| parent | eb7b920572ec732be5c4ff41586c1258667ea8e3 (diff) | |
| download | meta-openembedded-ae5a3b889d9b6d1569e787368267d019ca82613c.tar.gz | |
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>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/conf/include/ptest-packagelists-meta-oe.inc | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-support/uriparser/uriparser/run-ptest | 2 | ||||
| -rw-r--r-- | meta-oe/recipes-support/uriparser/uriparser_1.0.0.bb | 24 |
3 files changed, 22 insertions, 5 deletions
diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc index d475108cfc..0c72d5927c 100644 --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc | |||
| @@ -59,6 +59,7 @@ PTESTS_FAST_META_OE = "\ | |||
| 59 | zeromq \ | 59 | zeromq \ |
| 60 | cjson \ | 60 | cjson \ |
| 61 | libplist \ | 61 | libplist \ |
| 62 | uriparser \ | ||
| 62 | " | 63 | " |
| 63 | PTESTS_FAST_META_OE:append:x86 = " mcelog" | 64 | PTESTS_FAST_META_OE:append:x86 = " mcelog" |
| 64 | PTESTS_FAST_META_OE:append:x86-64 = " mcelog" | 65 | PTESTS_FAST_META_OE:append:x86-64 = " mcelog" |
diff --git a/meta-oe/recipes-support/uriparser/uriparser/run-ptest b/meta-oe/recipes-support/uriparser/uriparser/run-ptest new file mode 100644 index 0000000000..6d735b663a --- /dev/null +++ b/meta-oe/recipes-support/uriparser/uriparser/run-ptest | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | ./testrunner --gtest_print_time=0 | sed -E '/^\[ RUN/d ; s/\[ OK \]/PASS: / ; s/\[ DISABLED \]/SKIP: / ; s/\[ FAILED \]/FAIL: /' | ||
diff --git a/meta-oe/recipes-support/uriparser/uriparser_1.0.0.bb b/meta-oe/recipes-support/uriparser/uriparser_1.0.0.bb index b5a0a9f42d..b9c5100803 100644 --- a/meta-oe/recipes-support/uriparser/uriparser_1.0.0.bb +++ b/meta-oe/recipes-support/uriparser/uriparser_1.0.0.bb | |||
| @@ -1,16 +1,30 @@ | |||
| 1 | SUMMARY = "RFC 3986 compliant URI parsing library" | 1 | SUMMARY = "RFC 3986 compliant URI parsing library" |
| 2 | HOMEPAGE = "https://uriparser.github.io" | 2 | HOMEPAGE = "https://uriparser.github.io" |
| 3 | 3 | ||
| 4 | LICENSE = "BSD-3-Clause" | 4 | LICENSE = "BSD-3-Clause & LGPL-2.1-or-later" |
| 5 | LIC_FILES_CHKSUM = "file://src/COPYING;md5=fcc5a53146c2401f4b4f6a3bdf3f0168" | 5 | LICENSE:${PN} = "BSD-3-Clause" |
| 6 | LICENSE:${PN}-ptest = "LGPL-2.1-or-later" | ||
| 6 | 7 | ||
| 7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${BP}/${BP}.tar.gz" | 8 | LIC_FILES_CHKSUM = "file://src/COPYING;md5=fcc5a53146c2401f4b4f6a3bdf3f0168 \ |
| 9 | file://test/COPYING;md5=b9e6430863a3ea22cf4b0a8518279ed3" | ||
| 10 | |||
| 11 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${BP}/${BP}.tar.gz \ | ||
| 12 | file://run-ptest" | ||
| 8 | SRC_URI[sha256sum] = "291f25264a5c025005b1bc39de3c029e6a6ca0a8d6cfa5e61cb5b03702c0884d" | 13 | SRC_URI[sha256sum] = "291f25264a5c025005b1bc39de3c029e6a6ca0a8d6cfa5e61cb5b03702c0884d" |
| 9 | 14 | ||
| 10 | inherit cmake github-releases | 15 | inherit cmake github-releases ptest |
| 11 | 16 | ||
| 12 | UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" | 17 | UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" |
| 13 | 18 | ||
| 14 | EXTRA_OECMAKE += "-DURIPARSER_BUILD_DOCS:BOOL=OFF -DURIPARSER_BUILD_TESTS:BOOL=OFF" | 19 | PACKAGECONFIG = "${@bb.utils.contains('PTEST_ENABLED', '1', 'test', '', d)} " |
| 20 | PACKAGECONFIG[test] = "-DURIPARSER_BUILD_TESTS:BOOL=ON, -DURIPARSER_BUILD_TESTS:BOOL=OFF, googletest" | ||
| 21 | |||
| 22 | EXTRA_OECMAKE += " \ | ||
| 23 | -DURIPARSER_BUILD_DOCS:BOOL=OFF \ | ||
| 24 | " | ||
| 25 | |||
| 26 | do_install_ptest(){ | ||
| 27 | install ${B}/testrunner ${D}${PTEST_PATH} | ||
| 28 | } | ||
| 15 | 29 | ||
| 16 | BBCLASSEXTEND += "native" | 30 | BBCLASSEXTEND += "native" |
