aboutsummaryrefslogtreecommitdiff
path: root/automated/lib
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-05-03 21:01:54 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-05-04 18:07:22 +0000
commitaed8b75a14ba285ff9c04a530349c2bd20952ab8 (patch)
treee356bca5e28e4fd6fd0ab333836673b694dd3b12 /automated/lib
parent04703e92503691595a9a441e2a33523d6e7a12bc (diff)
Exit on install_deps error
If test script runs with '-e' argument, test should exit on errors. If test script runs without '-e' argument, 'if [ $? -ne 0 ]' will throw an error message and exit on installation error. Change-Id: I6365801582deaf7f5f105fe7014eadc4d0d3cdf7 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/lib')
-rwxr-xr-xautomated/lib/sh-test-lib4
1 files changed, 4 insertions, 0 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index 299964d..109e2f4 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -209,6 +209,10 @@ install_deps() {
warn_msg "Unsupported distro: ${dist}! Package installation skipped."
;;
esac
+ # shellcheck disable=SC2181
+ if [ $? -ne 0 ]; then
+ error_msg "Failed to install dependencies, exiting..."
+ fi
fi
}