From bcc9162e170a68fc13a7efec6c9724a2470291d6 Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Thu, 8 Sep 2016 16:44:25 +0800 Subject: v2: linux: add openjdk smoke test Change-Id: I1abb98d67746529197b5f262311e2b06a582edf8 Signed-off-by: Chase Qi --- automated/lib/sh-test-lib | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'automated/lib') 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} -- cgit v1.2.3