X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap-verify-perf.sh;h=042d44ed4bbef9f66989a4182c9c1e5680b6262e;hp=746d1a0a584503320c27976d52081dfb97cf48c5;hb=dbb26bdddde2556a78a596f236783480dc60bc0f;hpb=4ae37074a3e74bd6fdcd606d1553b99131372c84 diff --git a/bootstrap-verify-perf.sh b/bootstrap-verify-perf.sh index 746d1a0a58..042d44ed4b 100755 --- a/bootstrap-verify-perf.sh +++ b/bootstrap-verify-perf.sh @@ -19,6 +19,7 @@ TOPOLOGIES="topologies/available/lf_testbed2-710-520.yaml" # Reservation dir RESERVATION_DIR="/tmp/reservation_dir" +INSTALLATION_DIR="/tmp/install_dir" # Jenkins VPP deb paths (convert to full path) VPP_DEBS="$( readlink -f $@ | tr '\n' ' ' )" @@ -59,24 +60,33 @@ while :; do sleep ${SLEEP_TIME} done +function cancel_all { + python ${CUR_DIR}/resources/tools/topo_installation.py -c -d ${INSTALLATION_DIR} -t $1 + python ${CUR_DIR}/resources/tools/topo_reservation.py -c -t $1 +} + +# On script exit we cancel the reservation and installation and delete all vpp +# packages +trap "cancel_all ${WORKING_TOPOLOGY}" EXIT + python ${CUR_DIR}/resources/tools/topo_installation.py -t ${WORKING_TOPOLOGY} \ - -d ${RESERVATION_DIR} \ + -d ${INSTALLATION_DIR} \ -p ${VPP_DEBS} if [ $? -eq 0 ]; then echo "VPP Installed on hosts from: ${WORKING_TOPOLOGY}" else echo "Failed to copy vpp deb files to DUTs" - exit $? + exit 1 fi -function cancel_reservation { - python ${CUR_DIR}/resources/tools/topo_reservation.py -c -t $1 -} - -# On script exit we cancel the reservation and delete all vpp packages -trap "cancel_reservation ${WORKING_TOPOLOGY}" EXIT - -# run performance test suite -pybot -L TRACE \ - -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \ - -s performance tests/ +if [ ! -z "$TEST_TAG" ]; then +# run specific performance tests by tag if variable is set + pybot -L TRACE \ + -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \ + -i "${TEST_TAG,,}" tests/ +else +# run full performance test suite + pybot -L TRACE \ + -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \ + -s performance tests/ +fi