diff options
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 | |||
3 | echo "############ Running Wolfssl Ptest ##########" | ||
4 | |||
5 | log_file=ptest.log | ||
6 | temp_dir=$(mktemp -d /tmp/wolfss_temp.XXXXXX) | ||
7 | echo "Wolfssl ptest logs are stored in ${temp_dir}/${log_file}" | ||
8 | |||
9 | ./test/unit.test > "$temp_dir/$log_file" 2>&1 | ||
10 | |||
11 | echo "Test script returned: $?" | ||
12 | |||
13 | MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file) | ||
14 | |||
15 | if [ -n "$MAGIC_SENTENCE" ]; then | ||
16 | echo "$MAGIC_SENTENCE" | ||
17 | echo "PASS: Wolfssl" | ||
18 | else | ||
19 | echo "#### Issue with at least one test !####" | ||
20 | echo "FAIL: Wolfssl" | ||
21 | fi | ||
22 | NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file) | ||
23 | |||
24 | exit $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" | |||
12 | PROVIDES += "cyassl" | 12 | PROVIDES += "cyassl" |
13 | RPROVIDES:${PN} = "cyassl" | 13 | RPROVIDES:${PN} = "cyassl" |
14 | 14 | ||
15 | SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master" | 15 | SRC_URI = " \ |
16 | git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master \ | ||
17 | file://run-ptest \ | ||
18 | " | ||
19 | |||
16 | SRCREV = "00e42151ca061463ba6a95adb2290f678cbca472" | 20 | SRCREV = "00e42151ca061463ba6a95adb2290f678cbca472" |
17 | 21 | ||
18 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
19 | 23 | ||
20 | inherit autotools | 24 | inherit autotools ptest |
21 | 25 | ||
22 | PACKAGECONFIG ?= "reproducible-build" | 26 | PACKAGECONFIG ?= "reproducible-build" |
23 | 27 | ||
24 | PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build," | 28 | PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build," |
25 | BBCLASSEXTEND += "native nativesdk" | 29 | BBCLASSEXTEND += "native nativesdk" |
30 | |||
31 | RDEPENDS:${PN}-ptest += " bash" | ||
32 | |||
33 | do_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. |
21 | IMAGE_OVERHEAD_FACTOR = "1.0" | 21 | IMAGE_OVERHEAD_FACTOR = "1.0" |
22 | IMAGE_ROOTFS_EXTRA_SPACE = "324288" | 22 | IMAGE_ROOTFS_EXTRA_SPACE = "324288" |
23 | IMAGE_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 | ||