summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/wolfssl/files/run-ptest')
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/run-ptest26
1 files changed, 26 insertions, 0 deletions
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..fd260d441a
--- /dev/null
+++ b/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
@@ -0,0 +1,26 @@
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
11ret=$?
12
13echo "Test script returned: $ret"
14
15MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file)
16
17if [ -n "$MAGIC_SENTENCE" ]; then
18 echo "$MAGIC_SENTENCE"
19 echo "PASS: Wolfssl"
20else
21 echo "#### Issue with at least one test !####"
22 echo "FAIL: Wolfssl"
23fi
24NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file)
25
26exit $ret