+PYBOT_ARGS="-W 150 -L TRACE"
+
+ARCHIVE_ARTIFACTS=(log.html output.xml report.html output_perf_data.xml)
+
+# If we run this script from CSIT jobs we want to use stable vpp version
+if [[ ${JOB_NAME} == csit-* ]] ;
+then
+ mkdir vpp_download
+ cd vpp_download
+
+ if [[ ${TEST_TAG} == "PERFTEST_NIGHTLY" ]] ;
+ then
+ # Download the latest VPP build .deb install packages
+ echo Downloading VPP packages...
+ bash ${SCRIPT_DIR}/resources/tools/download_install_vpp_pkgs.sh --skip-install
+
+ VPP_DEBS="$( readlink -f *.deb | tr '\n' ' ' )"
+ # Take vpp package and get the vpp version
+ VPP_STABLE_VER="$( expr match $(ls *.deb | head -n 1) 'vpp-\(.*\)-deb.deb' )"
+ else
+ DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+ VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
+ VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU)
+ VPP_CLASSIFIER="-deb"
+ # Download vpp build from nexus and set VPP_DEBS variable
+ wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ wget -q "${VPP_REPO_URL}/vpp-dbg/${VPP_STABLE_VER}/vpp-dbg-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ wget -q "${VPP_REPO_URL}/vpp-dev/${VPP_STABLE_VER}/vpp-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ wget -q "${VPP_REPO_URL}/vpp-lib/${VPP_STABLE_VER}/vpp-lib-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ wget -q "${VPP_REPO_URL}/vpp-plugins/${VPP_STABLE_VER}/vpp-plugins-${VPP_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ VPP_DEBS="$( readlink -f *.deb | tr '\n' ' ' )"
+ fi
+
+ cd ..
+
+# If we run this script from vpp project we want to use local build
+elif [[ ${JOB_NAME} == vpp-* ]] ;
+then
+ # Use local packages provided as argument list
+ # Jenkins VPP deb paths (convert to full path)
+ VPP_DEBS="$( readlink -f $@ | tr '\n' ' ' )"
+ # Take vpp package and get the vpp version
+ VPP_STABLE_VER="$( expr match $1 'vpp-\(.*\)-deb.deb' )"
+ # Download DPDK parts not included in dpdk plugin of vpp build
+ DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64
+ VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU)
+ VPP_CLASSIFIER="-deb"
+ wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit
+ VPP_DEBS+=($( readlink -f vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb ))
+else
+ echo "Unable to identify job type based on JOB_NAME variable: ${JOB_NAME}"
+ exit 1
+fi