diff options
-rw-r--r-- | DPDK_STABLE_VER | 2 | ||||
-rw-r--r-- | VPP_REPO_URL_CENTOS | 2 | ||||
-rw-r--r-- | VPP_STABLE_VER_CENTOS | 1 | ||||
-rw-r--r-- | VPP_STABLE_VER_UBUNTU (renamed from VPP_STABLE_VER) | 0 | ||||
-rwxr-xr-x | bootstrap-centos.sh | 25 | ||||
-rwxr-xr-x | bootstrap-ubuntu.sh | 8 | ||||
-rwxr-xr-x | bootstrap-verify-perf.sh | 10 | ||||
-rw-r--r-- | bootstrap-vpp-verify-semiweekly.sh | 24 | ||||
-rw-r--r-- | bootstrap-vpp-verify-weekly.sh | 80 | ||||
-rw-r--r-- | resources/libraries/bash/dut_setup.sh | 14 | ||||
-rwxr-xr-x | resources/tools/virl/bin/start-testcase | 29 |
11 files changed, 118 insertions, 77 deletions
diff --git a/DPDK_STABLE_VER b/DPDK_STABLE_VER index 4d15335391..63a0487385 100644 --- a/DPDK_STABLE_VER +++ b/DPDK_STABLE_VER @@ -1 +1 @@ -16.11-vpp1_amd64 +16.11-vpp5 diff --git a/VPP_REPO_URL_CENTOS b/VPP_REPO_URL_CENTOS index dde24ca407..bc11e8d2a1 100644 --- a/VPP_REPO_URL_CENTOS +++ b/VPP_REPO_URL_CENTOS @@ -1 +1 @@ -https://nexus.fd.io/content/repositories/fd.io.yum/ +https://nexus.fd.io/content/repositories/fd.io.master.centos7/io/fd/vpp/ diff --git a/VPP_STABLE_VER_CENTOS b/VPP_STABLE_VER_CENTOS new file mode 100644 index 0000000000..e803432cb1 --- /dev/null +++ b/VPP_STABLE_VER_CENTOS @@ -0,0 +1 @@ +17.04-rc0~235_g6f96649~b1858.x86_64 diff --git a/VPP_STABLE_VER b/VPP_STABLE_VER_UBUNTU index 4a16be9db9..4a16be9db9 100644 --- a/VPP_STABLE_VER +++ b/VPP_STABLE_VER_UBUNTU diff --git a/bootstrap-centos.sh b/bootstrap-centos.sh index 6f8fba00b6..0e5e664e2a 100755 --- a/bootstrap-centos.sh +++ b/bootstrap-centos.sh @@ -17,8 +17,7 @@ set -x cat /etc/hostname cat /etc/hosts -sudo apt-get -y update -sudo apt-get -y install libpython2.7-dev python-virtualenv +sudo yum install -y python-devel python-virtualenv VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") @@ -28,7 +27,7 @@ VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" VIRL_TOPOLOGY=double-ring-nested.centos7 -VIRL_RELEASE=csit-centos-7.3-1611 +VIRL_RELEASE=csit-centos-7.3-1611_2017-02-14_1.3 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -46,7 +45,7 @@ LOG_PATH="${SCRIPT_DIR}/tmp" # Use tmp dir for tarballs export TMPDIR="${SCRIPT_DIR}/tmp" -SHARED_MEMORY_PATH="/run/shm" +SHARED_MEMORY_PATH="/dev/shm" function ssh_do() { echo @@ -125,23 +124,21 @@ done echo "Selected VIRL servers: ${VIRL_SERVER[@]}" # Temporarily download VPP packages from nexus.fd.io +DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER).x86_64 +VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS) +VPP_CLASSIFIER="" if [ "${#}" -ne "0" ]; then arr=(${@}) echo ${arr[0]} # DPDK is not part of the vpp build - DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER) - wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit - wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit + wget -q "${VPP_REPO_URL}/vpp-dpdk-devel/${DPDK_STABLE_VER}/vpp-dpdk-devel-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit else rm -f *.rpm - DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER) - VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER) - VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS) - VPP_CLASSIFIER="-rpm" + VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_CENTOS) wget -q "${VPP_REPO_URL}/vpp/${VPP_STABLE_VER}/vpp-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit - wget -q "${VPP_REPO_URL}/vpp-dbg/${VPP_STABLE_VER}/vpp-dbg-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit - wget -q "${VPP_REPO_URL}/vpp-dev/${VPP_STABLE_VER}/vpp-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit - wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit + wget -q "${VPP_REPO_URL}/vpp-debuginfo/${VPP_STABLE_VER}/vpp-debuginfo-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit + wget -q "${VPP_REPO_URL}/vpp-devel/${VPP_STABLE_VER}/vpp-devel-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit + wget -q "${VPP_REPO_URL}/vpp-dpdk-devel/${DPDK_STABLE_VER}/vpp-dpdk-devel-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit wget -q "${VPP_REPO_URL}/vpp-lib/${VPP_STABLE_VER}/vpp-lib-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit wget -q "${VPP_REPO_URL}/vpp-plugins/${VPP_STABLE_VER}/vpp-plugins-${VPP_STABLE_VER}${VPP_CLASSIFIER}.rpm" || exit fi diff --git a/bootstrap-ubuntu.sh b/bootstrap-ubuntu.sh index 7eeb68113c..b860231f0e 100755 --- a/bootstrap-ubuntu.sh +++ b/bootstrap-ubuntu.sh @@ -29,7 +29,7 @@ VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" VIRL_TOPOLOGY=double-ring-nested.xenial -VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6 +VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -126,8 +126,8 @@ done echo "Selected VIRL servers: ${VIRL_SERVER[@]}" # Temporarily download VPP and DPDK packages from nexus.fd.io -DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER) -VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL) +DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER)_amd64 +VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_UBUNTU) VPP_CLASSIFIER="-deb" if [ "${#}" -ne "0" ]; then arr=(${@}) @@ -137,7 +137,7 @@ if [ "${#}" -ne "0" ]; then wget -q "${VPP_REPO_URL}/vpp-dpdk-dkms/${DPDK_STABLE_VER}/vpp-dpdk-dkms-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.deb" || exit else rm -f *.deb - VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER) + VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU) 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 diff --git a/bootstrap-verify-perf.sh b/bootstrap-verify-perf.sh index e08a923485..f7fcb414a7 100755 --- a/bootstrap-verify-perf.sh +++ b/bootstrap-verify-perf.sh @@ -45,9 +45,9 @@ then # 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) - VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL) - VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER) + 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 @@ -71,8 +71,8 @@ then # Take vpp package and get the vpp version VPP_STABLE_VER="$( expr match $1 'vpp-\(.*\)-deb.deb' )" # DPDK is not part of the vpp build - DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER) - VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL) + 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-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_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 diff --git a/bootstrap-vpp-verify-semiweekly.sh b/bootstrap-vpp-verify-semiweekly.sh index 6fa505572b..b0402e0e3e 100644 --- a/bootstrap-vpp-verify-semiweekly.sh +++ b/bootstrap-vpp-verify-semiweekly.sh @@ -21,10 +21,6 @@ RETURN_STATUS=0 cat /etc/hostname cat /etc/hosts -export DEBIAN_FRONTEND=noninteractive -sudo apt-get -y update -sudo apt-get -y install libpython2.7-dev python-virtualenv - PYBOT_ARGS="--noncritical MULTI_THREAD" ARCHIVE_ARTIFACTS=(log.html output.xml report.html) @@ -34,8 +30,12 @@ export PYTHONPATH=${SCRIPT_DIR} if [ -f "/etc/redhat-release" ]; then DISTRO="CENTOS" + sudo yum install -y python-devel python-virtualenv else DISTRO="UBUNTU" + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -y update + sudo apt-get -y install libpython2.7-dev python-virtualenv fi # 1st step: Download and prepare VPP packages @@ -47,29 +47,29 @@ if [ "${#}" -ne "0" ]; then else case "$DISTRO" in CENTOS ) - rm -f *.rpm + PACKAGE=rpm ;; UBUNTU ) - rm -f *.deb + PACKAGE=deb esac # Download the latest VPP build install packages + rm -f *.${PACKAGE} echo Downloading VPP packages... bash ${SCRIPT_DIR}/resources/tools/download_install_vpp_pkgs.sh --skip-install fi # Take vpp package and get the vpp version +VPP_PKGS=(*.$PACKAGE) case "$DISTRO" in CENTOS ) - VPP_PKGS=(*.rpm) VPP_VER="$( expr match $(ls *.rpm | head -n 1) 'vpp-\(.*\).rpm' )" - echo ${VPP_PKGS[@]} ;; UBUNTU ) - VPP_PKGS=(*.deb) VPP_VER="$( expr match $(ls *.deb | head -n 1) 'vpp-\(.*\)-deb.deb' )" - echo ${VPP_PKGS[@]} esac +echo ${VPP_PKGS[@]} + set +x echo "****************************************************************************************************************************************" echo "1st step: Download VPP packages FINISHED" @@ -112,7 +112,7 @@ case "$DISTRO" in ;; UBUNTU ) VIRL_TOPOLOGY=double-ring-nested.xenial - VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6 + VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7 esac SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -202,7 +202,7 @@ echo "Updated file names: " ${VPP_PKGS_VIRL[@]} cat ${VIRL_PKEY} # Copy the files to VIRL host -scp ${SSH_OPTIONS} *.deb \ +scp ${SSH_OPTIONS} *.${PACKAGE} \ ${VIRL_USERNAME}@${VIRL_SERVER}:${VIRL_DIR_LOC}/ result=$? diff --git a/bootstrap-vpp-verify-weekly.sh b/bootstrap-vpp-verify-weekly.sh index d9749d5eb1..c04db572d2 100644 --- a/bootstrap-vpp-verify-weekly.sh +++ b/bootstrap-vpp-verify-weekly.sh @@ -17,10 +17,6 @@ set -x cat /etc/hostname cat /etc/hosts -export DEBIAN_FRONTEND=noninteractive -sudo apt-get -y update -sudo apt-get -y install libpython2.7-dev python-virtualenv - VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") VIRL_SERVER="" @@ -29,8 +25,19 @@ VIRL_PKEY=priv_key VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" -VIRL_TOPOLOGY=double-ring-nested.xenial -VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6 +if [ -f "/etc/redhat-release" ]; then + DISTRO="CENTOS" + sudo yum install -y python-devel python-virtualenv + VIRL_TOPOLOGY=double-ring-nested.centos7 + VIRL_RELEASE=csit-centos-7.3-1611_2017-02-14_1.3 +else + DISTRO="UBUNTU" + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -y update + sudo apt-get -y install libpython2.7-dev python-virtualenv + VIRL_TOPOLOGY=double-ring-nested.xenial + VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-20_1.7 +fi SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -109,42 +116,57 @@ done # Temporarily download VPP and DPDK packages from nexus.fd.io SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER) -VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL) -VPP_CLASSIFIER="-deb" +case "$DISTRO" in + CENTOS ) + VPP_ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins" + DPDK_ARTIFACTS="vpp-dpdk-devel" + PACKAGE="rpm" + VPP_CLASSIFIER="" + DPDK_STABLE_VER=$(cat ${SCRIPT_DIR}/DPDK_STABLE_VER).x86_64 + VPP_REPO_URL=$(cat ${SCRIPT_DIR}/VPP_REPO_URL_CENTOS) + VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_CENTOS) + ;; + UBUNTU ) + VPP_ARTIFACTS="vpp vpp-dbg vpp-dev vpp-lib vpp-plugins" + DPDK_ARTIFACTS="vpp-dpdk-dev vpp-dpdk-dkms" + PACKAGE="deb" + VPP_CLASSIFIER="-deb" + 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) +esac if [ "${#}" -ne "0" ]; then arr=(${@}) echo ${arr[0]} # DPDK is not part of the vpp build - wget -q "${VPP_REPO_URL}/vpp-dpdk-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_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 + for ARTIFACT in ${DPDK_ARTIFACTS}; do + wget -q "${VPP_REPO_URL}/${ARTIFACT}/${DPDK_STABLE_VER}/${ARTIFACT}-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit + done else - rm -f *.deb - VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER) - 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-dev/${DPDK_STABLE_VER}/vpp-dpdk-dev-${DPDK_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 + rm -f *.${PACKAGE} + for ARTIFACT in ${DPDK_ARTIFACTS}; do + wget -q "${VPP_REPO_URL}/${ARTIFACT}/${DPDK_STABLE_VER}/${ARTIFACT}-${DPDK_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit + done + for ARTIFACT in ${VPP_ARTIFACTS}; do + wget -q "${VPP_REPO_URL}/${ARTIFACT}/${VPP_STABLE_VER}/${ARTIFACT}-${VPP_STABLE_VER}${VPP_CLASSIFIER}.${PACKAGE}" || exit + done fi -VPP_DEBS=(*.deb) -echo ${VPP_DEBS[@]} +VPP_PKGS=(*.$PACKAGE) +echo ${VPP_PKGS[@]} VIRL_DIR_LOC="/tmp" -VPP_DEBS_FULL=(${VPP_DEBS[@]}) +VPP_PKGS_FULL=(${VPP_PKGS[@]}) # Prepend directory location at remote host to deb file list -for index in "${!VPP_DEBS_FULL[@]}"; do - VPP_DEBS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_DEBS_FULL[${index}]} +for index in "${!VPP_PKGS_FULL[@]}"; do + VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} done -echo "Updated file names: " ${VPP_DEBS_FULL[@]} +echo "Updated file names: " ${VPP_PKGS_FULL[@]} # Copy the files to VIRL host -scp ${SSH_OPTIONS} *.deb \ +scp ${SSH_OPTIONS} *.${PACKAGE} \ ${VIRL_USERNAME}@${VIRL_SERVER}:${VIRL_DIR_LOC}/ result=$? @@ -164,7 +186,7 @@ function stop_virl_simulation { VIRL_SID=$(ssh ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER} \ - "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_DEBS_FULL[@]}") + "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") retval=$? if [ ${retval} -ne "0" ]; then echo "VIRL simulation start failed" @@ -214,7 +236,7 @@ do -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ --suite "tests.func" \ --include vm_envAND3_node_single_link_topo \ - --include vm_envAND3_node_double_link_topo \ + --include vm_envAND3_nodePACAKGE_double_link_topo \ --exclude PERFTEST \ --noncritical EXPECTED_FAILING \ --output log_test_set${test_set} \ diff --git a/resources/libraries/bash/dut_setup.sh b/resources/libraries/bash/dut_setup.sh index fa88978d5a..952b82bdc7 100644 --- a/resources/libraries/bash/dut_setup.sh +++ b/resources/libraries/bash/dut_setup.sh @@ -23,7 +23,11 @@ function cmd { echo echo "[Command_desc] Starting ${0}" -cmd 'dpkg -l vpp\*' +if [ -f "/etc/redhat-release" ]; then + cmd 'rpm -qai vpp*' +else + cmd 'dpkg -l vpp\*' +fi cmd 'ps aux | grep vpp' @@ -44,10 +48,14 @@ cmd 'sudo dmidecode | grep UUID' cmd 'lspci -Dnn' -cmd 'tail -n 100 /var/log/syslog' +if [ -f "/etc/redhat-release" ]; then + cmd 'tail -n 100 /var/log/messages' +else + cmd 'tail -n 100 /var/log/syslog' +fi echo "[Command_desc] Adding dpdk-input trace" cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 100"' echo "[Command_desc] Adding vhost-user-input trace" -cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 100"' +cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 100"'
\ No newline at end of file diff --git a/resources/tools/virl/bin/start-testcase b/resources/tools/virl/bin/start-testcase index 99a4b0bd8e..151fce83ea 100755 --- a/resources/tools/virl/bin/start-testcase +++ b/resources/tools/virl/bin/start-testcase @@ -54,9 +54,9 @@ def main(): # parser = argparse.ArgumentParser() parser.add_argument("topology", help="the base topology to be started") - parser.add_argument("packages", help="Path to the VPP .deb(s) that " + - "is/are to be installed", nargs='+') - parser.add_argument("-c", "--copy", help="Copy the .deb packages, " + + parser.add_argument("packages", help="Path to the VPP .deb(s) or .rpm(s) " + + "that is/are to be installed", nargs='+') + parser.add_argument("-c", "--copy", help="Copy the VPP packages, " + "leaving the originals in place. Default is to " + "move them.", action='store_true') parser.add_argument("-k", "--keep", help="Keep (do not delete) the " + @@ -91,8 +91,8 @@ def main(): parser.add_argument("-spu", "--ssh-pubkey", help="SSH public keyfile", default="/home/jenkins-in/.ssh/id_rsa_virl.pub") parser.add_argument("-r", "--release", help="VM disk image/release " + - "(ex. \"csit-ubuntu-14.04.4_2016-05-25_1.0\")", - default="csit-ubuntu-14.04.4_2016-05-25_1.0") + "(ex. \"csit-ubuntu-16.04.1_2016-12-19_1.6\")", + default="csit-ubuntu-16.04.1_2016-12-19_1.6") parser.add_argument("--topology-directory", help="Topology directory", default="/home/jenkins-in/testcase-infra/topologies") @@ -140,9 +140,9 @@ def main(): open(topology_virl_filename, 'r') as old_file: for line in old_file: line = line.replace(" - VIRL-USER-SSH-PUBLIC-KEY", " - "+pub_key) - line = line.replace("$$NFS_SERVER_SCRATCH$$", \ + line = line.replace("$$NFS_SERVER_SCRATCH$$", args.nfs_server_ip+":"+args.nfs_scratch_directory) - line = line.replace("$$NFS_SERVER_COMMON$$", \ + line = line.replace("$$NFS_SERVER_COMMON$$", args.nfs_server_ip+":"+args.nfs_common_directory) line = line.replace("$$VM_IMAGE$$", "server-"+args.release) new_file.write(line) @@ -343,8 +343,21 @@ def main(): client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(ipaddr, username=args.ssh_user, key_filename=args.ssh_privkey) + if 'centos' in args.topology: + if args.verbosity >= 1: + print "DEBUG: Installing RPM packages" + vpp_install_command = 'sudo rpm -ivh /scratch/vpp/*.rpm' + elif 'trusty' in args.topology or 'xenial' in args.topology: + if args.verbosity >= 1: + print "DEBUG: Installing DEB packages" + vpp_install_command = 'sudo dpkg -i --force-all ' \ + '/scratch/vpp/*.deb' + else: + print "ERROR: Unsupported OS requested: {}"\ + .format(args.topology) + vpp_install_command = '' stdin, stdout, stderr = \ - client.exec_command('sudo dpkg -i --force-all /scratch/vpp/*deb') + client.exec_command(vpp_install_command) c_stdout = stdout.read() c_stderr = stderr.read() if args.verbosity >= 2: |