tests: kbs: Enable cli installation also on CentOS

One of our machines is running CentOS 9 Stream, and we could easily
verify that we can build and install the kbs client there, thus we're
expanding the installation script to also support CentOS 9 Stream.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2024-05-22 13:49:02 +02:00
parent 27d7f4c5b8
commit 414d716eef

View File

@@ -125,16 +125,26 @@ kbs_set_resource_from_file() {
kbs_install_cli() {
command -v kbs-client >/dev/null && return
if ! command -v apt >/dev/null; then
>&2 echo "ERROR: running on unsupported distro"
return 1
fi
source /etc/os-release || source /usr/lib/os-release
case "${ID}" in
ubuntu)
local pkgs="build-essential"
local pkgs="build-essential"
sudo apt-get update -y
# shellcheck disable=2086
sudo apt-get install -y $pkgs
;;
centos)
local pkgs="make"
sudo apt-get update -y
# shellcheck disable=2086
sudo apt-get install -y $pkgs
# shellcheck disable=2086
sudo dnf install -y $pkgs
;;
*)
>&2 echo "ERROR: running on unsupported distro"
return 1
;;
esac
# Mininum required version to build the client (read from versions.yaml)
local rust_version