summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSofiane HAMAM <sofiane.hamam@smile.fr>2025-03-10 10:06:52 +0100
committerArmin Kuster <akuster808@gmail.com>2025-03-23 15:27:08 -0400
commit7bc1db1659bbc4a1fda45c86a81b18b658cd6990 (patch)
treeb2fafad113d51ca846015d29b439054639429663
parent32ddea6c361ecbfa90fb3d853c5bf0e0b1f2b19f (diff)
downloadmeta-openembedded-7bc1db1659bbc4a1fda45c86a81b18b658cd6990.tar.gz
Wolfssl: add ptest
Add ptest for Wolfssl package. Set IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-wolfssl to 700M enough to avoid a "No space left on device". BEGIN: /usr/lib/wolfssl/ptest Wolfssl ptest logs are stored in /tmp/wolfss_temp.qvuQ9h/ptest.log Test script returned: 0 unit_test: Success for all configured tests. PASS: Wolfssl DURATION: 7 END: /usr/lib/wolfssl/ptest Signed-off-by: Sofiane HAMAM <sofiane.hamam@smile.fr> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/conf/include/ptest-packagelists-meta-networking.inc1
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/run-ptest24
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb23
-rw-r--r--meta-networking/recipes-core/images/meta-networking-image-ptest.bb1
4 files changed, 47 insertions, 2 deletions
diff --git a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc
index 7ec6f9063d..c3a2202de6 100644
--- a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc
+++ b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc
@@ -19,6 +19,7 @@ PTESTS_FAST_META_NETWORKING = "\
19 openhpi \ 19 openhpi \
20 squid \ 20 squid \
21 tcpdump \ 21 tcpdump \
22 wolfssl \
22" 23"
23 24
24# firewalld currently hangs forever so disable it for now 25# firewalld currently hangs forever so disable it for now
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/run-ptest b/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
new file mode 100644
index 0000000000..ff66f4ef6c
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
@@ -0,0 +1,24 @@
1#!/bin/sh
2
3echo "############ Running Wolfssl Ptest ##########"
4
5log_file=ptest.log
6temp_dir=$(mktemp -d /tmp/wolfss_temp.XXXXXX)
7echo "Wolfssl ptest logs are stored in ${temp_dir}/${log_file}"
8
9./test/unit.test > "$temp_dir/$log_file" 2>&1
10
11echo "Test script returned: $?"
12
13MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file)
14
15if [ -n "$MAGIC_SENTENCE" ]; then
16 echo "$MAGIC_SENTENCE"
17 echo "PASS: Wolfssl"
18else
19 echo "#### Issue with at least one test !####"
20 echo "FAIL: Wolfssl"
21fi
22NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file)
23
24exit $NUM_FAILS
diff --git a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb
index 47c14dd1a1..119d76abb9 100644
--- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb
+++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb
@@ -12,11 +12,30 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
12PROVIDES += "cyassl" 12PROVIDES += "cyassl"
13RPROVIDES:${PN} = "cyassl" 13RPROVIDES:${PN} = "cyassl"
14 14
15SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master" 15SRC_URI = " \
16 git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master \
17 file://run-ptest \
18"
16SRCREV = "8970ff4c34034dbb3594943d11f8c9d4c5512bd5" 19SRCREV = "8970ff4c34034dbb3594943d11f8c9d4c5512bd5"
17 20
18S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
19 22
20inherit autotools 23inherit autotools ptest
21 24
22BBCLASSEXTEND += "native nativesdk" 25BBCLASSEXTEND += "native nativesdk"
26
27RDEPENDS:${PN}-ptest += " bash"
28
29do_install_ptest() {
30 # Prevent QA Error "package contains reference to TMPDIR [buildpaths]" for unit.test script
31 # Replace the occurences of ${B}/src with '${PTEST_PATH}'
32 sed -i 's|${B}/src|${PTEST_PATH}|g' ${B}/tests/unit.test
33
34 install -d ${D}${PTEST_PATH}/test
35
36 # create an empty folder examples, needed in wolfssl's tests/api.c to "Test loading path with no files"
37 install -d ${D}${PTEST_PATH}/examples
38 cp -rf ${B}/tests/. ${D}${PTEST_PATH}/test
39 cp -rf ${S}/certs ${D}${PTEST_PATH}
40 cp -rf ${S}/tests ${D}${PTEST_PATH}
41}
diff --git a/meta-networking/recipes-core/images/meta-networking-image-ptest.bb b/meta-networking/recipes-core/images/meta-networking-image-ptest.bb
index 295da982ec..b6238d6100 100644
--- a/meta-networking/recipes-core/images/meta-networking-image-ptest.bb
+++ b/meta-networking/recipes-core/images/meta-networking-image-ptest.bb
@@ -20,6 +20,7 @@ BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_NETWO
20# box) and explicitly add up to 1500MB. 20# box) and explicitly add up to 1500MB.
21IMAGE_OVERHEAD_FACTOR = "1.0" 21IMAGE_OVERHEAD_FACTOR = "1.0"
22IMAGE_ROOTFS_EXTRA_SPACE = "324288" 22IMAGE_ROOTFS_EXTRA_SPACE = "324288"
23IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-wolfssl = "714288"
23# If a particular ptest needs more space, it can be customized: 24# If a particular ptest needs more space, it can be customized:
24#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288" 25#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
25 26