diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-12-15 20:08:18 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-12-16 19:57:33 -0800 |
| commit | 88ebc1418694a65db144443739eae48a220700aa (patch) | |
| tree | d272015c736bcfc8a8352ecba0960a08914c53c5 | |
| parent | a45d5c0f2eda3e58796e655b9bef06b4dae3441e (diff) | |
| download | meta-openembedded-88ebc1418694a65db144443739eae48a220700aa.tar.gz | |
botan: add ptest support
The test suite takes just around 30s to execute.
Sample output:
root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-15T19:02
BEGIN: /usr/lib/botan/ptest
PASS: AES-128/CCM(10,2)
PASS: AES-128/CCM(12,2)
PASS: AES-128/CCM(14,2)
PASS: AES-128/CCM(16,2)
PASS: AES-128/CCM(16,3)
PASS: AES-128/CCM(16,4)
[...lots of lines...]
PASS: XMSS/SHAKE_16_512 verify invalid signature
PASS: XMSS/SHAKE_20_256 verify invalid signature
PASS: XMSS/SHAKE_20_512 verify invalid signature
PASS: ZFEC encoding/decoding
Tests complete ran 3375688 tests in 28.38 sec all tests ok
DURATION: 29
END: /usr/lib/botan/ptest
2025-12-15T19:02
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Tested also by forcing some tests to fail, which was also displayed correctly.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/conf/include/ptest-packagelists-meta-oe.inc | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-crypto/botan/botan/run-ptest | 2 | ||||
| -rw-r--r-- | meta-oe/recipes-crypto/botan/botan_3.10.0.bb | 8 |
3 files changed, 8 insertions, 3 deletions
diff --git a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc index d092c3c327..d475108cfc 100644 --- a/meta-oe/conf/include/ptest-packagelists-meta-oe.inc +++ b/meta-oe/conf/include/ptest-packagelists-meta-oe.inc | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | PTESTS_FAST_META_OE = "\ | 9 | PTESTS_FAST_META_OE = "\ |
| 10 | asio \ | 10 | asio \ |
| 11 | audiofile \ | 11 | audiofile \ |
| 12 | botan \ | ||
| 12 | cli11 \ | 13 | cli11 \ |
| 13 | cmocka \ | 14 | cmocka \ |
| 14 | cunit \ | 15 | cunit \ |
diff --git a/meta-oe/recipes-crypto/botan/botan/run-ptest b/meta-oe/recipes-crypto/botan/botan/run-ptest new file mode 100644 index 0000000000..42ddb161eb --- /dev/null +++ b/meta-oe/recipes-crypto/botan/botan/run-ptest | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | botan-test --data-dir=/usr/share/botan/tests/data/ | tee ./test.out | grep " ran " | sed 's/^\(.*\) ran .* all ok$/PASS: \1/; s/^\(.*\) ran .* FAILED$/FAIL: \1/' | ||
diff --git a/meta-oe/recipes-crypto/botan/botan_3.10.0.bb b/meta-oe/recipes-crypto/botan/botan_3.10.0.bb index e079dd73de..dcc0e6aa77 100644 --- a/meta-oe/recipes-crypto/botan/botan_3.10.0.bb +++ b/meta-oe/recipes-crypto/botan/botan_3.10.0.bb | |||
| @@ -4,12 +4,13 @@ LICENSE = "BSD-2-Clause" | |||
| 4 | LIC_FILES_CHKSUM = "file://license.txt;md5=3f911cecfc74a2d9f1ead9a07bd92a6e" | 4 | LIC_FILES_CHKSUM = "file://license.txt;md5=3f911cecfc74a2d9f1ead9a07bd92a6e" |
| 5 | SECTION = "libs" | 5 | SECTION = "libs" |
| 6 | 6 | ||
| 7 | SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz" | 7 | SRC_URI = "https://botan.randombit.net/releases/Botan-${PV}.tar.xz \ |
| 8 | file://run-ptest" | ||
| 8 | SRC_URI[sha256sum] = "fde194236f6d5434f136ea0a0627f6cc9d26af8b96e9f1e1c7d8c82cd90f4f24" | 9 | SRC_URI[sha256sum] = "fde194236f6d5434f136ea0a0627f6cc9d26af8b96e9f1e1c7d8c82cd90f4f24" |
| 9 | 10 | ||
| 10 | S = "${UNPACKDIR}/Botan-${PV}" | 11 | S = "${UNPACKDIR}/Botan-${PV}" |
| 11 | 12 | ||
| 12 | inherit python3native siteinfo lib_package | 13 | inherit python3native siteinfo lib_package ptest |
| 13 | 14 | ||
| 14 | CPU ?= "${TARGET_ARCH}" | 15 | CPU ?= "${TARGET_ARCH}" |
| 15 | CPU:x86 = "x86_32" | 16 | CPU:x86 = "x86_32" |
| @@ -55,7 +56,8 @@ FILES:${PN}-python3 = "${libdir}/python3" | |||
| 55 | 56 | ||
| 56 | RDEPENDS:${PN}-python3 += "python3" | 57 | RDEPENDS:${PN}-python3 += "python3" |
| 57 | RDEPENDS:${PN}-bin += "${PN}" | 58 | RDEPENDS:${PN}-bin += "${PN}" |
| 58 | RDEPENDS:${PN}-test += "${PN}" | 59 | RDEPENDS:${PN}-test += "${PN} ca-certificates" |
| 60 | RDEPENDS:${PN}-ptest += "${PN}-test" | ||
| 59 | FILES:${PN}:remove = "${bindir}/*" | 61 | FILES:${PN}:remove = "${bindir}/*" |
| 60 | FILES:${PN}-bin:remove = "${bindir}/*" | 62 | FILES:${PN}-bin:remove = "${bindir}/*" |
| 61 | FILES:${PN}-bin = "${bindir}/botan" | 63 | FILES:${PN}-bin = "${bindir}/botan" |
