summaryrefslogtreecommitdiff
path: root/automated/lib
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2016-09-08 16:44:25 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-09-13 11:52:04 +0000
commitbcc9162e170a68fc13a7efec6c9724a2470291d6 (patch)
tree68480bf7517f7dfe6258ff423833f7f2c475310c /automated/lib
parente913f2d65af88622b25d8a1a9ed518c51424252e (diff)
downloadtest-definitions-pipe-bcc9162e170a68fc13a7efec6c9724a2470291d6.tar.gz
v2: linux: add openjdk smoke test
Change-Id: I1abb98d67746529197b5f262311e2b06a582edf8 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/lib')
-rwxr-xr-xautomated/lib/sh-test-lib14
1 files changed, 10 insertions, 4 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index 3edecb8..0b81fc8 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -7,7 +7,7 @@ error_msg() {
local msg="$1"
[ -z "${msg}" ] && msg="Unknown error"
printf "ERROR: %s\n" "${msg}" >&2
- exit 1
+ exit 0
}
warn_msg() {
@@ -37,7 +37,12 @@ exit_on_fail() {
if [ "${exit_code}" -ne 0 ]; then
echo "${test} fail" | tee -a "${RESULT_FILE}"
- exit 1
+ # Exit normally to continue to run the following steps defined in test
+ # definition file.
+ exit 0
+ else
+ echo "${test} pass" | tee -a "${RESULT_FILE}"
+ return 0
fi
}
@@ -99,8 +104,9 @@ install_deps() {
dist_name
case "${dist}" in
Debian|Ubuntu)
- apt-get update
- apt-get install -y -q ${pkgs}
+ # Use the default answers for all questions.
+ DEBIAN_FRONTEND=noninteractive apt-get update -q -y
+ DEBIAN_FRONTEND=noninteractive apt-get install -q -y ${pkgs}
;;
CentOS)
yum -e 0 -y install ${pkgs}