* [PATCH libevl] evl-test: return non-zero status when tests fail with -k
@ 2026-01-09 14:31 Tobias Schaffner
2026-01-09 16:06 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Schaffner @ 2026-01-09 14:31 UTC (permalink / raw)
To: xenomai; +Cc: rpm, Tobias Schaffner
The -k option of evl-test allows the test suite to continue running
after a test failure. However, evl-test currently exits with status 0
even if one or more tests have failed.
Track the failure status and return a non-zero exit code when any test
failed.
Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
---
utils/evl-test | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/utils/evl-test b/utils/evl-test
index b2d3a7f..0d0ca81 100644
--- a/utils/evl-test
+++ b/utils/evl-test
@@ -68,6 +68,8 @@ if test x$do_list = xtrue; then
exit 0
fi
+result=0
+
for t in $test_list; do
test \! -x $t && echo "$(basename $0): $(basename $t): no such test" && exit 2
# Swap stdout<->stderr for the test, capturing stderr into $log.
@@ -83,9 +85,10 @@ for t in $test_list; do
echo "$(basename $t): no kernel support"
else
echo "** $(basename $t): BROKEN"
- test x$keep_going = xfalse && exit $status
+ result=$status
+ test x$keep_going = xfalse && break
fi
fi
done
-exit 0
+exit $result
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH libevl] evl-test: return non-zero status when tests fail with -k
2026-01-09 14:31 [PATCH libevl] evl-test: return non-zero status when tests fail with -k Tobias Schaffner
@ 2026-01-09 16:06 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2026-01-09 16:06 UTC (permalink / raw)
To: Tobias Schaffner; +Cc: xenomai
Tobias Schaffner <tobias.schaffner@siemens.com> writes:
> The -k option of evl-test allows the test suite to continue running
> after a test failure. However, evl-test currently exits with status 0
> even if one or more tests have failed.
>
> Track the failure status and return a non-zero exit code when any test
> failed.
>
> Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
> ---
> utils/evl-test | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/utils/evl-test b/utils/evl-test
> index b2d3a7f..0d0ca81 100644
> --- a/utils/evl-test
> +++ b/utils/evl-test
> @@ -68,6 +68,8 @@ if test x$do_list = xtrue; then
> exit 0
> fi
>
> +result=0
> +
> for t in $test_list; do
> test \! -x $t && echo "$(basename $0): $(basename $t): no such test" && exit 2
> # Swap stdout<->stderr for the test, capturing stderr into $log.
> @@ -83,9 +85,10 @@ for t in $test_list; do
> echo "$(basename $t): no kernel support"
> else
> echo "** $(basename $t): BROKEN"
> - test x$keep_going = xfalse && exit $status
> + result=$status
> + test x$keep_going = xfalse && break
> fi
> fi
> done
>
> -exit 0
> +exit $result
Merged, thanks.
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-09 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 14:31 [PATCH libevl] evl-test: return non-zero status when tests fail with -k Tobias Schaffner
2026-01-09 16:06 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.