diff options
author | Chase Qi <chase.qi@linaro.org> | 2017-01-12 20:46:29 +0800 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-01-18 19:50:34 +0000 |
commit | c25683acde8bb6309073181088c9c7dc1d68e968 (patch) | |
tree | 946fe74941737855732103683fcce247b707f7d4 /automated/lib | |
parent | 23ad91c26ed53722bcaca30c995955f91ada6bde (diff) |
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 <chase.qi@linaro.org>
Diffstat (limited to 'automated/lib')
-rwxr-xr-x | automated/lib/sh-test-lib | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |