[PATCH] tests: Indicate failure in test-daemon.sh by returning 1 if any test fails.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-01-29 at 10:56 +0200, Tanu Kaskinen wrote:
> ---
>  src/tests/test-daemon.sh |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/tests/test-daemon.sh b/src/tests/test-daemon.sh
> index 264e169..c1907a1 100755
> --- a/src/tests/test-daemon.sh
> +++ b/src/tests/test-daemon.sh
> @@ -52,8 +52,10 @@ sleep 5
>  
>  unset DISPLAY
>  
> +EXIT_CODE=0
> +
>  for ONE_TEST in $@; do
> -    ${ONE_TEST}
> +    ${ONE_TEST} || EXIT_CODE=1
>  done
>  
>  # terminate the designated pulseaudio daemon
> @@ -68,4 +70,4 @@ sleep 2
>  ## be sure it really died
>  kill -9 $DBUS_SESSION_BUS_PID > /dev/null 2>&1 || true
>  
> -exit 0
> +exit $EXIT_CODE

No feedback within a week. I've now applied this.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux