X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap.sh;h=cfb5a8f32016ada0b6c5134905c50e46b9e3043f;hp=189ec6f3cc4ac24a1eaabe915d2e4d524a9ecf39;hb=6928c2b1620e5d020a19e944f416df6a1f4b85ad;hpb=02f01f9f327cc64745c1941968813b3f107ca771 diff --git a/bootstrap.sh b/bootstrap.sh index 189ec6f3cc..cfb5a8f320 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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,7 +46,6 @@ 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") @@ -267,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}]}" @@ -348,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 @@ -396,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