automated: use '*' instead of 'unknown' for unsupported distros
When dist_name() fails to detect distribution ID, it sets ${dist} to
'unknown'. install_deps() doesn't support 'unknown' distros, and it
doesn't support some known distros like oe-rpb either. Using wildcard
able to cover these two cases.
Change-Id: I619e06d9dbc911c9629d6d6a7f1622c40ed1f234
Signed-off-by: Chase Qi <chase.qi@linaro.org>
diff --git a/automated/doc/test-writting-guidelines.rst b/automated/doc/test-writting-guidelines.rst
index eb422f6..6a84562 100644
--- a/automated/doc/test-writting-guidelines.rst
+++ b/automated/doc/test-writting-guidelines.rst
@@ -109,7 +109,7 @@
case "${dist}" in
debian|ubuntu) install_deps "lsb-release" "${SKIP_INSTALL}" ;;
fedora|centos) install_deps "redhat-lsb-core" "${SKIP_INSTALL}" ;;
- unknown) warn_msg "Unsupported distro: package install skipped" ;;
+ *) warn_msg "Unsupported distro: ${dist}! Package installation skipped." ;;
esac
Except automated package installation, you may also need to download and install
@@ -123,7 +123,7 @@
case "${dist}" in
debian|ubuntu) install_deps "${pkgs}" ;;
fedora|centos) install_deps "${pkgs}" ;;
- unknown) warn_msg "Unsupported distro: package install skipped" ;;
+ *) warn_msg "Unsupported distro: ${dist}! Package installation skipped." ;;
esac
# manually install steps.
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index 1429db6..9030899 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -205,8 +205,8 @@
# shellcheck disable=SC2086
dnf -e 0 -y install ${pkgs}
;;
- unknown)
- warn_msg "Unsupported distro: package install skipped"
+ *)
+ warn_msg "Unsupported distro: ${dist}! Package installation skipped."
;;
esac
fi
@@ -322,7 +322,7 @@
wget -O - "${url}" >> "/etc/yum.repos.d/3rd-party.repo"
;;
*)
- warn_msg "Unsupported distro: add_repo skipped"
+ warn_msg "Unsupported distro: ${dist}! add_repo skipped"
;;
esac
}