diff options
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-support/inotify-tools/files/run-ptest | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta-oe/recipes-support/inotify-tools/files/run-ptest b/meta-oe/recipes-support/inotify-tools/files/run-ptest index f3b23d86f0..1bd51248d8 100644 --- a/meta-oe/recipes-support/inotify-tools/files/run-ptest +++ b/meta-oe/recipes-support/inotify-tools/files/run-ptest | |||
| @@ -4,18 +4,18 @@ | |||
| 4 | set -e | 4 | set -e |
| 5 | 5 | ||
| 6 | # Run the test binary and capture output | 6 | # Run the test binary and capture output |
| 7 | output=$(./test) | 7 | output=$(./test 2>&1) |
| 8 | status=$? | ||
| 8 | 9 | ||
| 9 | # Print the output for logging | 10 | # Print the output for logging |
| 10 | echo "$output" | 11 | echo "$output" |
| 11 | 12 | ||
| 12 | # Extract the summary line | 13 | # Evaluate result based on exit code |
| 13 | summary=$(echo "$output" | tail -n 1) | 14 | if [ $status -eq 0 ]; then |
| 14 | 15 | echo "All tests passed successfully." | |
| 15 | # Check if any tests failed | ||
| 16 | if echo "$summary" | grep -q "0 failed"; then | ||
| 17 | exit 0 | 16 | exit 0 |
| 18 | else | 17 | else |
| 19 | echo "Some tests failed!" | 18 | echo "Test program exited with status $status." |
| 19 | echo "Some tests may have failed. See output above for details." | ||
| 20 | exit 1 | 20 | exit 1 |
| 21 | fi | 21 | fi |
