From c7d1abba182857b6bf6e59c6aad3e1a58b0c8ed7 Mon Sep 17 00:00:00 2001 From: Maciej Wawryk Date: Fri, 3 Jul 2020 10:59:12 +0200 Subject: [PATCH] test/vm_setup: Add clearlinux package manager Also remove unnecessary jq from pkgdep Signed-off-by: Maciej Wawryk Change-Id: I259e8f00a4a6e9c5463fa9e8bdefb19f9bdaa93d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3198 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Karol Latecki Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto --- scripts/pkgdep/clear-linux-os.sh | 2 +- test/common/config/pkgdep/swupd | 21 +++++++++++++++++++++ test/common/config/vm_setup.sh | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/common/config/pkgdep/swupd diff --git a/scripts/pkgdep/clear-linux-os.sh b/scripts/pkgdep/clear-linux-os.sh index d9583c2ece..a79a67e79f 100755 --- a/scripts/pkgdep/clear-linux-os.sh +++ b/scripts/pkgdep/clear-linux-os.sh @@ -3,7 +3,7 @@ # Install main dependencies swupd bundle-add -y c-basic make dev-utils openssl devpkg-libiscsi \ devpkg-ncurses python3-basic python-extras devpkg-open-iscsi \ - jq storage-utils + storage-utils # Additional dependencies for ISA-L used in compression swupd bundle-add -y dev-utils-dev # Additional dependencies for DPDK diff --git a/test/common/config/pkgdep/swupd b/test/common/config/pkgdep/swupd new file mode 100644 index 0000000000..c1d2a8a6b3 --- /dev/null +++ b/test/common/config/pkgdep/swupd @@ -0,0 +1,21 @@ +package_manager=swupd + +upgrade() { + sudo "$package_manager" update -y +} + +install() { + (($#)) || return 0 + + sudo "$package_manager" bundle-add -y "$@" +} + +packages=( + jq +) + +pre_install() { + if [[ $INTSALL_TSOCKS == true ]]; then + install tsocks || echo "Installation of the tsocks package failed, proxy may not be available" + fi +} diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 8719919bd6..b2b3a8fc10 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -72,6 +72,8 @@ elif hash pacman &> /dev/null; then source "$vmsetupdir/pkgdep/pacman" elif hash pkg &> /dev/null; then source "$vmsetupdir/pkgdep/pkg" +elif hash swupd &> /dev/null; then + source "$vmsetupdir/pkgdep/swupd" else package_manager="undefined" fi