From 7aa508c220cf5a43f50c4b66744746c4d3afd32f Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Fri, 20 Jan 2017 16:45:54 +0800 Subject: automated: sh-test-lib: use warn_msg for step skipping error_msg exit with non-zero, it will kill the 'run.sh' generated by lava-dispatcher or local test-runner as the file has '-e' enabled. To print a warning message for step skipping, use warn_msg instead of error_msg. Change-Id: I20f32de217761fab8261cfa625841737cca48288 Signed-off-by: Chase Qi --- automated/lib/sh-test-lib | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib index 3b2ab43..29fd8f9 100755 --- a/automated/lib/sh-test-lib +++ b/automated/lib/sh-test-lib @@ -66,7 +66,7 @@ exit_on_skip() { echo "${test_case} skip" | tee -a "${RESULT_FILE}" if [ -n "${msg}" ]; then - error_msg "${msg}" + warn_msg "${msg}" fi # Exit normally to continue to run the following steps defined in test @@ -259,7 +259,7 @@ dist_info() { case "${dist}" in Debian|Ubuntu) install_deps "lsb-release" ;; CentOS|Fedora) install_deps "redhat-lsb-core" ;; - *) error_msg "Unsupported distro: dist_info skipped" + *) warn_msg "Unsupported distro: dist_info skipped" esac fi @@ -276,7 +276,7 @@ add_key() { case "${dist}" in Debian|Ubuntu) wget -O - "${url}" | apt-key add - ;; CentOS|Fedora) infor_msg "add_key isn't needed on ${dist}" ;; - *) error_msg "Unsupported distro: add_key skipped" + *) warn_msg "Unsupported distro: add_key skipped" esac } @@ -307,7 +307,7 @@ add_repo() { wget -O - "${url}" >> "/etc/yum.repos.d/3rd-party.repo" ;; *) - error_msg "Unsupported distro: add_repo skipped" + warn_msg "Unsupported distro: add_repo skipped" ;; esac } -- cgit v1.2.3