start-testcase-DMM file addition
[csit.git] / bootstrap.sh
index e8da341..cfb5a8f 100755 (executable)
@@ -23,7 +23,7 @@ export PYTHONPATH=${SCRIPT_DIR}
 if [ -f "/etc/redhat-release" ]; then
     DISTRO="CENTOS"
     sudo yum install -y python-devel python-virtualenv
-    VPP_ARTIFACTS="vpp vpp-debuginfo vpp-devel vpp-lib vpp-plugins"
+    VPP_ARTIFACTS="vpp vpp-selinux-policy vpp-devel vpp-lib vpp-plugins"
     DPDK_ARTIFACTS=""
     PACKAGE="rpm"
     VPP_CLASSIFIER=""
@@ -32,7 +32,6 @@ if [ -f "/etc/redhat-release" ]; then
     VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_CENTOS)
     VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS)
     VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS)
-    SHARED_MEMORY_PATH="/dev/shm"
 else
     DISTRO="UBUNTU"
     export DEBIAN_FRONTEND=noninteractive
@@ -47,13 +46,12 @@ else
     VPP_STABLE_VER=$(cat ${SCRIPT_DIR}/VPP_STABLE_VER_UBUNTU)
     VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU)
     VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU)
-    SHARED_MEMORY_PATH="/run/shm"
 fi
 
 VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30")
 IPS_PER_VIRL=( "10.30.51.28:252"
-               "10.30.51.29:74"
-               "10.30.51.30:74" )
+               "10.30.51.29:252"
+               "10.30.51.30:252" )
 SIMS_PER_VIRL=( "10.30.51.28:13"
                "10.30.51.29:13"
                "10.30.51.30:13" )
@@ -92,8 +90,8 @@ VIRL_SERVER_EXPECTED_STATUS="PRODUCTION"
 
 SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error"
 
-TEST_GROUPS=("gre,ipv6,lisp,policer,rpf,softwire" "dhcp,ipsec,l2bd,l2xc,telemetry,vrf,vxlan" "cop,fds,honeycomb,iacl,ipv4,tap,vhost,vlan")
-SUITE_PATH="tests.func"
+TEST_GROUPS=("crypto,ip4_tunnels.softwire,ip4_tunnels.vxlan" "ip4,ip4_tunnels.gre,ip4_tunnels.lisp,ip6_tunnels.vxlan,ip6_tunnels.lisp,vm_vhost.ip4,vm_vhost.ip6" "interfaces,ip6,l2bd,l2xc,vm_vhost.l2bd,vm_vhost.l2xc,telemetry")
+SUITE_PATH="tests.vpp.func"
 SKIP_PATCH="SKIP_PATCH"
 
 # Create tmp dir
@@ -195,10 +193,6 @@ if [ "${#}" -ne "0" ]; then
     arr=(${@})
     echo ${arr[0]}
     SKIP_PATCH="skip_patchORskip_vpp_patch"
-    # Download DPDK parts not included in dpdk plugin of vpp build
-    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 *.${PACKAGE}
     for ARTIFACT in ${DPDK_ARTIFACTS}; do
@@ -271,6 +265,8 @@ for index in "${!VIRL_SERVER[@]}"; do
         ${VIRL_USERNAME}@${VIRL_SERVER[${index}]} \
         "start-testcase -vv --quota ${IP_QUOTA} --copy ${VIRL_TOPOLOGY} \
         --release ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}")
+        # TODO: remove param ${VPP_PKGS_FULL[@]} when start-testcase script is
+        # updated on all virl servers
     retval=$?
     if [ ${retval} -ne "0" ]; then
         echo "VIRL simulation start failed on ${VIRL_SERVER[${index}]}"
@@ -352,9 +348,9 @@ function run_test_set() {
         --output ${LOG_PATH}/log_test_set_run${nr} \
         tests/
 
-    local_run_rc=$?
-    echo ${local_run_rc} > ${SHARED_MEMORY_PATH}/rc_test_run${nr}
+    local local_run_rc=$?
     set -x
+    echo ${local_run_rc} > ${LOG_PATH}/rc_test_run${nr}
 }
 
 set +x
@@ -400,9 +396,13 @@ RC=0
 for index in "${!VIRL_SERVER[@]}"; do
     echo "Test_set${index} log:"
     cat ${LOG_PATH}/test_run${index}.log
-    RC_PARTIAL_RUN=$(cat ${SHARED_MEMORY_PATH}/rc_test_run${index})
+    RC_PARTIAL_RUN=$(cat ${LOG_PATH}/rc_test_run${index})
+    if [ -z "$RC_PARTIAL_RUN" ]; then
+        echo "Failed to retrieve return code from test run ${index}"
+        exit 1
+    fi
     RC=$((RC+RC_PARTIAL_RUN))
-    rm -f ${SHARED_MEMORY_PATH}/rc_test_run${index}
+    rm -f ${LOG_PATH}/rc_test_run${index}
     rm -f ${LOG_PATH}/test_run${index}.log
     echo
 done