From c25683acde8bb6309073181088c9c7dc1d68e968 Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Thu, 12 Jan 2017 20:46:29 +0800 Subject: automated: sh-test-lib: error_msg: exit with non-zero LAVA uses '-e' in run.sh. I though we should try to save as many results as possible by always exiting with zero so that the following 'send-to-lava.sh' step will be executed even when test script exit with non-zero. However, in this way, LAVA will record test run as pass even something went wrong and there is no result at all. Always exit with non-zero when error occurs should be the right approach, at least for error_msg() function. In the abnormally exiting cases, we will need to investigate test log in any way. Change-Id: Iaaa5d141878734dea3cd9860dd6779e5d09e10b1 Signed-off-by: Chase Qi --- automated/lib/sh-test-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'automated/lib') diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib index a44d2c8..b02c121 100755 --- a/automated/lib/sh-test-lib +++ b/automated/lib/sh-test-lib @@ -7,7 +7,7 @@ error_msg() { msg="$1" [ -z "${msg}" ] && msg="Unknown error" printf "ERROR: %s\n" "${msg}" >&2 - exit 0 + exit 1 } warn_msg() { -- cgit v1.2.3