X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap-hc2vpp-verify.sh;h=bd9ad323b36817d62428b8e1bfce40fab8bf5998;hp=b642da760f495254e3e96500f5245f1094c72b1f;hb=4c50519591b1bf73ca617a595b2b03f56edc4c01;hpb=6721e7f09aa95bff6622068332a3f56afad9c87b diff --git a/bootstrap-hc2vpp-verify.sh b/bootstrap-hc2vpp-verify.sh index b642da760f..bd9ad323b3 100755 --- a/bootstrap-hc2vpp-verify.sh +++ b/bootstrap-hc2vpp-verify.sh @@ -17,9 +17,7 @@ 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 +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") VIRL_SERVER="" @@ -29,14 +27,22 @@ VIRL_PKEY=priv_key VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" +ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) + OS=$1 -if [ "${OS}" == "ubuntu1604" ]; then - VIRL_TOPOLOGY=double-ring-nested.xenial - VIRL_RELEASE=csit-ubuntu-16.04.1_2017-02-23_1.8 -elif [ "${OS}" == "centos7" ]; then - VIRL_TOPOLOGY=double-ring-nested.centos7 - VIRL_RELEASE=csit-centos-7.3-1611_2017-02-23_1.4 +if [ -f "/etc/redhat-release" ]; then + DISTRO="CENTOS" + sudo yum install -y python-devel python-virtualenv + VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) + VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) +else + DISTRO="UBUNTU" + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -y update + sudo apt-get -y install libpython2.7-dev python-virtualenv + VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) + VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) fi SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" @@ -224,6 +230,16 @@ PYTHONPATH=`pwd` pybot -L TRACE -W 136\ --noncritical EXPECTED_FAILING \ tests/ +RETURN_STATUS=$? + # Get Honeycomb log file from virl host scp ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true + +# Archive artifacts +mkdir archive +for i in ${ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) archive/ +done + +exit ${RETURN_STATUS}