Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix(core): common.sh typos
[csit.git]
/
resources
/
libraries
/
bash
/
function
/
gather.sh
diff --git
a/resources/libraries/bash/function/gather.sh
b/resources/libraries/bash/function/gather.sh
index
429a2cc
..
ce1ed5b
100644
(file)
--- a/
resources/libraries/bash/function/gather.sh
+++ b/
resources/libraries/bash/function/gather.sh
@@
-1,5
+1,5
@@
-# Copyright (c) 20
19
Cisco and/or its affiliates.
-# Copyright (c) 20
19
PANTHEON.tech and/or its affiliates.
+# Copyright (c) 20
23
Cisco and/or its affiliates.
+# Copyright (c) 20
23
PANTHEON.tech and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@
-26,7
+26,7
@@
function gather_build () {
# Variables read:
# - TEST_CODE - String affecting test selection, usually jenkins job name.
# Variables read:
# - TEST_CODE - String affecting test selection, usually jenkins job name.
- # - DOWNLOAD_DIR - Path to directory
py
bot takes the build to test from.
+ # - DOWNLOAD_DIR - Path to directory
ro
bot takes the build to test from.
# Variables set:
# - DUT - CSIT test/ subdirectory containing suites to execute.
# Directories updated:
# Variables set:
# - DUT - CSIT test/ subdirectory containing suites to execute.
# Directories updated:
@@
-57,6
+57,10
@@
function gather_build () {
DUT="dpdk"
gather_dpdk || die "The function should have died on error."
;;
DUT="dpdk"
gather_dpdk || die "The function should have died on error."
;;
+ *"trex"*)
+ DUT="trex"
+ gather_trex || die "The function should have died on error."
+ ;;
*)
die "Unable to identify DUT type from: ${TEST_CODE}"
;;
*)
die "Unable to identify DUT type from: ${TEST_CODE}"
;;
@@
-88,7
+92,8
@@
function gather_dpdk () {
then
echo "Downloading latest DPDK packages from repo..."
# URL is not in quotes, calling command from variable keeps them.
then
echo "Downloading latest DPDK packages from repo..."
# URL is not in quotes, calling command from variable keeps them.
- wget_command=("wget" "--no-check-certificate" "-nv" "-O" "-")
+ wget_command=("wget" "--no-check-certificate" "--compression=auto")
+ wget_command+=("-nv" "-O" "-")
wget_command+=("${dpdk_repo}")
dpdk_stable_ver="$("${wget_command[@]}" | grep -v "2015"\
| grep -Eo 'dpdk-[^\"]+xz' | tail -1)" || {
wget_command+=("${dpdk_repo}")
dpdk_stable_ver="$("${wget_command[@]}" | grep -v "2015"\
| grep -Eo 'dpdk-[^\"]+xz' | tail -1)" || {
@@
-110,24
+115,35
@@
function gather_dpdk () {
fi
}
fi
}
+function gather_trex () {
+
+ # This function is required to bypass download dir check.
+ # Currently it creates empty file in download dir.
+ # TODO: Add required packages
+
+ set -exuo pipefail
+
+ touch trex-download-to-be-added.txt
+}
function gather_vpp () {
# Variables read:
# - BASH_FUNCTION_DIR - Bash directory with functions.
# - TEST_CODE - The test selection string from environment or argument.
function gather_vpp () {
# Variables read:
# - BASH_FUNCTION_DIR - Bash directory with functions.
# - TEST_CODE - The test selection string from environment or argument.
- # - DOWNLOAD_DIR - Path to directory
py
bot takes the build to test from.
+ # - DOWNLOAD_DIR - Path to directory
ro
bot takes the build to test from.
# - CSIT_DIR - Path to existing root of local CSIT git repository.
# Variables set:
# - VPP_VERSION - VPP stable version under test.
# Files read:
# - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use
# by csit-vpp not-timed jobs.
# - CSIT_DIR - Path to existing root of local CSIT git repository.
# Variables set:
# - VPP_VERSION - VPP stable version under test.
# Files read:
# - ${CSIT_DIR}/DPDK_STABLE_VER - DPDK version to use
# by csit-vpp not-timed jobs.
- # - ${CSIT_DIR}/VPP_STABLE_VER_UBUNTU - Ubuntu VPP version to usee.
- # - ../vpp*.deb|rpm - Relative to ${DOWNLOAD_DIR}, copied for vpp-csit jobs.
+ # - ${CSIT_DIR}/${VPP_VER_FILE} - Ubuntu VPP version to use.
+ # - ../*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.
# Directories updated:
# - ${DOWNLOAD_DIR}, vpp-*.deb files are copied here for vpp-csit jobs.
- # - ./ - Assumed ${DOWNLOAD_DIR},
vpp-
*.deb|rpm files
+ # - ./ - Assumed ${DOWNLOAD_DIR},
*vpp
*.deb|rpm files
# are downloaded here for csit-vpp.
# Functions called:
# - die - Print to stderr and exit, defined in common_functions.sh
# are downloaded here for csit-vpp.
# Functions called:
# - die - Print to stderr and exit, defined in common_functions.sh
@@
-141,9
+157,10
@@
function gather_vpp () {
"csit-"*)
# Use downloaded packages with specific version.
if [[ "${TEST_CODE}" == *"daily"* ]] || \
"csit-"*)
# Use downloaded packages with specific version.
if [[ "${TEST_CODE}" == *"daily"* ]] || \
- ([[ "${TEST_CODE}" == *"weekly"* ]] && \
- [[ "${TEST_CODE}" != *"device"* ]]) || \
- [[ "${TEST_CODE}" == *"semiweekly"* ]];
+ { [[ "${TEST_CODE}" == *"weekly"* ]] && \
+ [[ "${TEST_CODE}" != *"device"* ]]; } || \
+ [[ "${TEST_CODE}" == *"semiweekly"* ]] || \
+ [[ "${TEST_CODE}" == *"hourly"* ]];
then
warn "Downloading latest VPP packages from Packagecloud."
else
then
warn "Downloading latest VPP packages from Packagecloud."
else
@@
-156,8
+173,10
@@
function gather_vpp () {
download_artifacts || die
;;
"vpp-csit-"*)
download_artifacts || die
;;
"vpp-csit-"*)
+ # Shorten line.
+ pgks="${PKG_SUFFIX}"
# Use locally built packages.
# Use locally built packages.
- mv "${DOWNLOAD_DIR}"/../
"vpp"*".${PKG_SUFFIX
}" "${DOWNLOAD_DIR}"/ || {
+ mv "${DOWNLOAD_DIR}"/../
*vpp*."${pkgs
}" "${DOWNLOAD_DIR}"/ || {
die "Move command failed."
}
;;
die "Move command failed."
}
;;