aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/bash/function')
-rw-r--r--resources/libraries/bash/function/artifacts.sh26
-rw-r--r--resources/libraries/bash/function/common.sh3
-rw-r--r--resources/libraries/bash/function/dpdk.sh12
-rw-r--r--resources/libraries/bash/function/gather.sh7
-rw-r--r--resources/libraries/bash/function/per_patch.sh2
5 files changed, 29 insertions, 21 deletions
diff --git a/resources/libraries/bash/function/artifacts.sh b/resources/libraries/bash/function/artifacts.sh
index 3fe6bae428..15a4dd2fe1 100644
--- a/resources/libraries/bash/function/artifacts.sh
+++ b/resources/libraries/bash/function/artifacts.sh
@@ -86,7 +86,7 @@ function download_ubuntu_artifacts () {
repository installation was not successful."
fi
- packages=$(apt-cache -o Dir::Etc::SourceList=${apt_fdio_repo_file} \
+ pkgs=$(apt-cache -o Dir::Etc::SourceList=${apt_fdio_repo_file} \
-o Dir::Etc::SourceParts=${apt_fdio_repo_file} dumpavail \
| grep Package: | cut -d " " -f 2 | grep vpp) || {
die "Retrieval of available VPP packages failed."
@@ -102,7 +102,7 @@ function download_ubuntu_artifacts () {
fi
set +x
- for package in ${packages}; do
+ for package in ${pkgs}; do
# Filter packages with given version
pkg_info=$(apt-cache show -- ${package}) || {
die "apt-cache show on ${package} failed."
@@ -147,19 +147,19 @@ function download_centos_artifacts () {
}
# If version is set we will add suffix.
artifacts=()
- packages=(vpp vpp-selinux-policy vpp-devel vpp-lib vpp-plugins vpp-api-python)
+ pkgs=(vpp vpp-selinux-policy vpp-devel vpp-lib vpp-plugins vpp-api-python)
if [ -z "${VPP_VERSION-}" ]; then
- artifacts+=(${packages[@]})
+ artifs+=(${pkgs[@]})
else
- artifacts+=(${packages[@]/%/-${VPP_VERSION-}})
+ artifs+=(${pkgs[@]/%/-${VPP_VERSION-}})
fi
if [[ "${INSTALL:-false}" == "true" ]]; then
- sudo yum -y install "${artifacts[@]}" || {
+ sudo yum -y install "${artifs[@]}" || {
die "Install VPP artifact failed."
}
else
- sudo yum -y install --downloadonly --downloaddir=. "${artifacts[@]}" || {
+ sudo yum -y install --downloadonly --downloaddir=. "${artifs[@]}" || {
die "Download VPP artifacts failed."
}
fi
@@ -181,20 +181,20 @@ function download_opensuse_artifacts () {
die "Packagecloud FD.io repo fetch failed."
}
# If version is set we will add suffix.
- artifacts=()
- packages=(vpp vpp-devel vpp-lib vpp-plugins libvpp0)
+ artifs=()
+ pkgs=(vpp vpp-devel vpp-lib vpp-plugins libvpp0)
if [ -z "${VPP_VERSION-}" ]; then
- artifacts+=(${packages[@]})
+ artifs+=(${pkgs[@]})
else
- artifacts+=(${packages[@]/%/-${VPP_VERSION-}})
+ artifs+=(${pkgs[@]/%/-${VPP_VERSION-}})
fi
if [[ "${INSTALL:-false}" == "true" ]]; then
- sudo yum -y install "${artifacts[@]}" || {
+ sudo yum -y install "${artifs[@]}" || {
die "Install VPP artifact failed."
}
else
- sudo yum -y install --downloadonly --downloaddir=. "${artifacts[@]}" || {
+ sudo yum -y install --downloadonly --downloaddir=. "${artifs[@]}" || {
die "Download VPP artifacts failed."
}
fi
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index ec95f9227c..ed3b2044d3 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -526,7 +526,8 @@ function get_test_tag_string () {
TEST_TAG_STRING=$("${cmd[@]}" <<< "${comment}" || true)
if [[ -z "${TEST_TAG_STRING-}" ]]; then
# Probably we got a base64 encoded comment.
- comment=$(base64 --decode <<< "${GERRIT_EVENT_COMMENT_TEXT}" || true)
+ comment="${GERRIT_EVENT_COMMENT_TEXT}"
+ comment=$(base64 --decode <<< "${comment}" || true)
comment=$(fgrep "${trigger}" <<< "${comment}" || true)
TEST_TAG_STRING=$("${cmd[@]}" <<< "${comment}" || true)
fi
diff --git a/resources/libraries/bash/function/dpdk.sh b/resources/libraries/bash/function/dpdk.sh
index 362524349c..3c16372294 100644
--- a/resources/libraries/bash/function/dpdk.sh
+++ b/resources/libraries/bash/function/dpdk.sh
@@ -95,8 +95,10 @@ function dpdk_compile () {
sed -i "${sed_cmd}" "${sed_file}" || die "RTE_MAX_NUMA_NODES Patch failed"
# Patch L3FWD.
- sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128/#define RTE_TEST_RX_DESC_DEFAULT 1024/g"
- sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512/#define RTE_TEST_TX_DESC_DEFAULT 1024/g"
+ sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128"
+ sed_rxd+="/#define RTE_TEST_RX_DESC_DEFAULT 1024/g"
+ sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512"
+ sed_txd+="/#define RTE_TEST_TX_DESC_DEFAULT 1024/g"
sed_file="./main.c"
pushd examples/l3fwd || die "Pushd failed"
sed -i "${sed_rxd}" "${sed_file}" || die "Patch failed"
@@ -207,8 +209,10 @@ function dpdk_l3fwd_compile () {
pushd "${DPDK_DIR}" || die "Pushd failed"
# Patch L3FWD.
- sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128/#define RTE_TEST_RX_DESC_DEFAULT 2048/g"
- sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512/#define RTE_TEST_TX_DESC_DEFAULT 2048/g"
+ sed_rxd="s/^#define RTE_TEST_RX_DESC_DEFAULT 128"
+ sed_rxd+="/#define RTE_TEST_RX_DESC_DEFAULT 2048/g"
+ sed_txd="s/^#define RTE_TEST_TX_DESC_DEFAULT 512"
+ sed_txd+="/#define RTE_TEST_TX_DESC_DEFAULT 2048/g"
sed_file="./main.c"
pushd examples/l3fwd || die "Pushd failed"
sed -i "${sed_rxd}" "${sed_file}" || die "Patch failed"
diff --git a/resources/libraries/bash/function/gather.sh b/resources/libraries/bash/function/gather.sh
index 2112e1be01..e3a6a9d150 100644
--- a/resources/libraries/bash/function/gather.sh
+++ b/resources/libraries/bash/function/gather.sh
@@ -124,7 +124,8 @@ function gather_vpp () {
# - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use
# by csit-vpp not-timed jobs.
# - ${CSIT_DIR}/${VPP_VER_FILE} - Ubuntu VPP version to use.
- # - ../*vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR}, copied for vpp-csit jobs.
+ # - ../*vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR},
+ # copied for vpp-csit jobs.
# Directories updated:
# - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for vpp-csit jobs.
# - ./ - Assumed ${DOWNLOAD_DIR}, *vpp*.deb|rpm files
@@ -157,8 +158,10 @@ function gather_vpp () {
download_artifacts || die
;;
"vpp-csit-"*)
+ # Shorten line.
+ pgks="${PKG_SUFFIX}"
# Use locally built packages.
- mv "${DOWNLOAD_DIR}"/../*vpp*."${PKG_SUFFIX}" "${DOWNLOAD_DIR}"/ || {
+ mv "${DOWNLOAD_DIR}"/../*vpp*."${pkgs}" "${DOWNLOAD_DIR}"/ || {
die "Move command failed."
}
;;
diff --git a/resources/libraries/bash/function/per_patch.sh b/resources/libraries/bash/function/per_patch.sh
index 76dbf51416..4af3302008 100644
--- a/resources/libraries/bash/function/per_patch.sh
+++ b/resources/libraries/bash/function/per_patch.sh
@@ -96,7 +96,7 @@ function build_vpp_ubuntu_amd64 () {
"using build default ($(grep -c ^processor /proc/cpuinfo))."
fi
- make UNATTENDED=y pkg-verify || die "VPP build using make pkg-verify failed."
+ make UNATTENDED=y pkg-verify || die "VPP build with make pkg-verify failed."
echo "* VPP ${1-} BUILD SUCCESSFULLY COMPLETED" || {
die "Argument not found."
}