X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=bootstrap-nsh_sfc-functional-virl.sh;h=aa4d5cc0452228ced2129c1fb6e9937af9b3afa3;hb=refs%2Fchanges%2F64%2F12264%2F1;hp=70a68c01f1afc950a421038e88e202098d25310a;hpb=2bffc3fb7d273f352187ccdd412e5536c9a4917d;p=csit.git diff --git a/bootstrap-nsh_sfc-functional-virl.sh b/bootstrap-nsh_sfc-functional-virl.sh index 70a68c01f1..aa4d5cc045 100755 --- a/bootstrap-nsh_sfc-functional-virl.sh +++ b/bootstrap-nsh_sfc-functional-virl.sh @@ -17,10 +17,18 @@ set -x cat /etc/hostname cat /etc/hosts +ARCHIVE_ARTIFACTS=(log.html output.xml report.html) + export DEBIAN_FRONTEND=noninteractive sudo apt-get -y update sudo apt-get -y install libpython2.7-dev python-virtualenv +if [ -f "/etc/redhat-release" ]; then + OS="centos7" +else + OS="ubuntu1604" +fi + VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") VIRL_SERVER="" @@ -29,8 +37,7 @@ VIRL_PKEY=priv_key VIRL_SERVER_STATUS_FILE="status" VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" -STREAM=$1 -OS=$2 +STREAM="stable.1804" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export PYTHONPATH=${SCRIPT_DIR} @@ -122,7 +129,7 @@ done # Download VPP and NSH SFC packages from the current branch echo Downloading packages... -bash ${SCRIPT_DIR}/resources/tools/download_nsh_sfc_pkgs.sh ${STREAM} ${OS} +bash ${SCRIPT_DIR}/resources/tools/scripts/download_nsh_sfc_pkgs.sh ${STREAM} ${OS} if [ "${OS}" == "centos7" ]; then VPP_PKGS=(*.rpm) @@ -151,14 +158,10 @@ for index in "${!VIRL_SERVER[@]}"; do if [ "${copy}" -eq "0" ]; then echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" else - if [ "${OS}" == "centos7" ]; then - scp ${SSH_OPTIONS} *.rpm \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - else - scp ${SSH_OPTIONS} *.deb \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - fi - result=$? + scp ${SSH_OPTIONS} ${VPP_PKGS[@]} \ + ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ + + result=$? if [ "${result}" -ne "0" ]; then echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" echo ${result} @@ -228,8 +231,14 @@ fi PYTHONPATH=`pwd` pybot -L TRACE -W 136\ -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "nsh_sfc_tests.func" \ + --suite "tests.nsh_sfc.func" \ --include vm_envAND3_node_single_link_topo \ --exclude PERFTEST \ --exclude SKIP_PATCH \ - nsh_sfc_tests/ + tests/ + +# Archive artifacts +mkdir archive +for i in ${ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) archive/ +done