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