diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-05-29 08:16:00 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-05-29 08:19:31 -0700 |
| commit | af1612a85b5049eac2ff7456267a1f18f03d9245 (patch) | |
| tree | c65c13bb4f1d8428225ca9078180e88bfb0a28d9 | |
| parent | 5cf87bcb8704b7ed1fe4aa5953870a2e627dd50a (diff) | |
| download | meta-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-ptest | 6 |
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 | ||
| 11 | echo "Test script returned: $?" | 11 | ret=$? |
| 12 | |||
| 13 | echo "Test script returned: $ret" | ||
| 12 | 14 | ||
| 13 | MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file) | 15 | MAGIC_SENTENCE=$(grep "unit_test: Success for all configured tests." $temp_dir/$log_file) |
| 14 | 16 | ||
| @@ -21,4 +23,4 @@ else | |||
| 21 | fi | 23 | fi |
| 22 | NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file) | 24 | NUM_FAILS=$(grep -c "Failed" $temp_dir/$log_file) |
| 23 | 25 | ||
| 24 | exit $NUM_FAILS | 26 | exit $ret |
