docs: report updates in physical_testbeds section.
[csit.git] / bootstrap-hc2vpp-perf.sh
index 81c80fd..a3531ab 100755 (executable)
@@ -19,9 +19,9 @@ OS=$2
 ODL=$3
 
 # Space separated list of available testbeds, described by topology files
-TOPOLOGIES="topologies/available/lf_testbed1.yaml \
-            topologies/available/lf_testbed2.yaml \
-            topologies/available/lf_testbed3.yaml"
+TOPOLOGIES="topologies/available/lf_3n_hsw_testbed1.yaml \
+            topologies/available/lf_3n_hsw_testbed2.yaml \
+            topologies/available/lf_3n_hsw_testbed3.yaml"
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
@@ -31,7 +31,12 @@ INSTALLATION_DIR="/tmp/install_dir"
 
 PYBOT_ARGS="-W 150 -L TRACE"
 
-ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log)
+JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log)
+LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log)
+JOB_ARCHIVE_DIR="archive"
+LOG_ARCHIVE_DIR="$WORKSPACE/archives"
+mkdir -p ${JOB_ARCHIVE_DIR}
+mkdir -p ${LOG_ARCHIVE_DIR}
 
 WORKING_TOPOLOGY=""
 export PYTHONPATH=${SCRIPT_DIR}
@@ -49,7 +54,7 @@ pip install -r requirements.txt
 while :; do
     for TOPOLOGY in ${TOPOLOGIES};
     do
-        python ${SCRIPT_DIR}/resources/tools/topo_reservation.py -t ${TOPOLOGY}
+        python ${SCRIPT_DIR}/resources/tools/scripts/topo_reservation.py -t ${TOPOLOGY}
         if [ $? -eq 0 ]; then
             WORKING_TOPOLOGY=${TOPOLOGY}
             echo "Reserved: ${WORKING_TOPOLOGY}"
@@ -69,8 +74,8 @@ while :; do
 done
 
 function cancel_all {
-    python ${SCRIPT_DIR}/resources/tools/topo_installation.py -c -d ${INSTALLATION_DIR} -t $1 -hc True
-    python ${SCRIPT_DIR}/resources/tools/topo_reservation.py -c -t $1
+    python ${SCRIPT_DIR}/resources/tools/scripts/topo_installation.py -c -d ${INSTALLATION_DIR} -t $1 -hc True
+    python ${SCRIPT_DIR}/resources/tools/scripts/topo_reservation.py -c -t $1
 }
 
 # On script exit we cancel the reservation and installation and delete all vpp
@@ -79,7 +84,11 @@ trap "cancel_all ${WORKING_TOPOLOGY}" EXIT
 
 # Download VPP and HC packages from the current branch
 echo Downloading packages...
-bash ${SCRIPT_DIR}/resources/tools/download_hc_pkgs.sh ${STREAM} 'ubuntu1604'
+CSIT_DIR=${SCRIPT_DIR}
+source "${SCRIPT_DIR}/resources/libraries/bash/function/artifacts.sh"
+source "${SCRIPT_DIR}/resources/libraries/bash/function/artifacts_hc.sh"
+download_artifacts
+download_artifacts_hc
 
 if [ "${OS}" == "centos7" ]; then
     VPP_PKGS=(*.rpm)
@@ -89,7 +98,7 @@ fi
 echo ${VPP_PKGS[@]}
 
 # Install packages
-python ${SCRIPT_DIR}/resources/tools/topo_installation.py -t ${WORKING_TOPOLOGY} \
+python ${SCRIPT_DIR}/resources/tools/scripts/topo_installation.py -t ${WORKING_TOPOLOGY} \
                                                        -d ${INSTALLATION_DIR} \
                                                        -p ${VPP_PKGS[@]} \
                                                        -hc True
@@ -103,15 +112,18 @@ fi
 # run full performance test suite and exit on fail
         pybot ${PYBOT_ARGS} \
               -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \
-              -s "tests.perf.honeycomb" \
+              -s "tests.honeycomb.perf" \
               --variable install_dir:${INSTALLATION_DIR} \
               tests/
         RETURN_STATUS=$(echo $?)
 
-# Archive artifacts
-mkdir archive
-for i in ${ARCHIVE_ARTIFACTS[@]}; do
-    cp $( readlink -f ${i} | tr '\n' ' ' ) archive/
+# Archive JOB artifacts in jenkins
+for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do
+    cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/
+done
+# Archive JOB artifacts to logs.fd.io
+for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do
+    cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/
 done
 
 exit ${RETURN_STATUS}