summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-05-29 08:16:00 -0700
committerKhem Raj <raj.khem@gmail.com>2025-05-29 08:19:31 -0700
commitaf1612a85b5049eac2ff7456267a1f18f03d9245 (patch)
treec65c13bb4f1d8428225ca9078180e88bfb0a28d9
parent5cf87bcb8704b7ed1fe4aa5953870a2e627dd50a (diff)
downloadmeta-openembedded-af1612a85b5049eac2ff7456267a1f18f03d9245.tar.gz
wolfssl: Use the return value from unit.test as pass/fail indicator
Using a string search for Fail is not going to work always e.g. when all tests are passing it still prints a summary string with string "Fail" in it which points to 0, however the logic here catches that and counts it as 1 failure and marks the return value as 1 and ptest runner interprets that as failure Pass the return value from unit.test which should be 0 on all passes or non zero otherwise. Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/wolfssl/files/run-ptest6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-networking/recipes-connectivity/wolfssl/files/run-ptest b/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
index ff66f4ef6c..fd260d441a 100644
--- a/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
+++ b/meta-networking/recipes-connectivity/wolfssl/files/run-ptest
@@ -8,7 +8,9 @@ echo "Wolfssl ptest logs are stored in ${temp_dir}/${log_file}"
8 8
9./test/unit.test > "$temp_dir/$log_file" 2>&1 9./test/unit.test > "$temp_dir/$log_file" 2>&1
10 10
11echo "Test script returned: $?" 11ret=$?
12
13echo "Test script returned: $ret"
12 14
13MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file) 15MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file)
14 16
@@ -21,4 +23,4 @@ else
21fi 23fi
22NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file) 24NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file)
23 25
24exit $NUM_FAILS 26exit $ret