summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.2.bb24
-rw-r--r--meta-networking/recipes-core/images/meta-networking-image-ptest.bb1
4 files changed, 48 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 2197a06e74..1137258825 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.2.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb
index 009434d96a..b7ff23e719 100644
--- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb
+++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb
@@ -12,14 +12,34 @@ 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"
19
16SRCREV = "00e42151ca061463ba6a95adb2290f678cbca472" 20SRCREV = "00e42151ca061463ba6a95adb2290f678cbca472"
17 21
18S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
19 23
20inherit autotools 24inherit autotools ptest
21 25
22PACKAGECONFIG ?= "reproducible-build" 26PACKAGECONFIG ?= "reproducible-build"
23 27
24PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build," 28PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build,"
25BBCLASSEXTEND += "native nativesdk" 29BBCLASSEXTEND += "native nativesdk"
30
31RDEPENDS:${PN}-ptest += " bash"
32
33do_install_ptest() {
34 # Prevent QA Error "package contains reference to TMPDIR [buildpaths]" for unit.test script
35 # Replace the occurences of ${B}/src with '${PTEST_PATH}'
36 sed -i 's|${B}/src|${PTEST_PATH}|g' ${B}/tests/unit.test
37
38 install -d ${D}${PTEST_PATH}/test
39
40 # create an empty folder examples, needed in wolfssl's tests/api.c to "Test loading path with no files"
41 install -d ${D}${PTEST_PATH}/examples
42 cp -rf ${B}/tests/. ${D}${PTEST_PATH}/test
43 cp -rf ${S}/certs ${D}${PTEST_PATH}
44 cp -rf ${S}/tests ${D}${PTEST_PATH}
45}
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