X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Ftestcase_common.sh;h=3ed51c911b9268f2590b53a1f9c49118fa23e2d5;hb=6208ce89d7e6a554a8ed0b524104e7dddc833916;hp=0afc2bcd9843959b5f47beca89c5999fc5a5beb0;hpb=49f0e5ab01b51aee8713a17aed86cd6d229b40cc;p=nonrtric.git diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh index 0afc2bcd..3ed51c91 100755 --- a/test/common/testcase_common.sh +++ b/test/common/testcase_common.sh @@ -698,6 +698,8 @@ if [ $? -eq 0 ]; then echo -e $RED" Build Failed"$ERED ((RES_CONF_FAIL++)) cat .dockererr + echo -e $RED"Exiting...."$ERED + exit 1 fi cd $curdir else @@ -715,6 +717,8 @@ if [ $? -eq 0 ]; then echo -e $RED" Build Failed"$ERED ((RES_CONF_FAIL++)) cat .dockererr + echo -e $RED"Exiting...."$ERED + exit 1 fi cd $curdir else @@ -732,6 +736,8 @@ if [ $? -eq 0 ]; then echo -e $RED" Build Failed"$ERED ((RES_CONF_FAIL++)) cat .dockererr + echo -e $RED"Exiting...."$ERED + exit 1 fi cd $curdir else @@ -811,6 +817,7 @@ print_result() { echo "-------------------------------------------------------------------------------------------------" echo "-- Description: "$TC_ONELINE_DESCR echo "-- Execution time: " $duration " seconds" + echo "-- Used env file: "$TEST_ENV_VAR_FILE echo "-------------------------------------------------------------------------------------------------" echo "------------------------------------- RESULTS" echo "" @@ -1868,6 +1875,23 @@ use_agent_retries() { start_ecs() { echo -e $BOLD"Starting ECS"$EBOLD + + curdir=$PWD + cd $SIM_GROUP + cd ecs + cd $ECS_HOST_MNT_DIR + if [ -d database ]; then + echo -e $BOLD" Cleaning files in mounted dir: $PWD/database"$EBOLD + rm database/* > /dev/null + if [ $? -ne 0 ]; then + echo -e $RED" Cannot remove database files in: $PWD"$ERED + exit 1 + fi + else + echo " No files in mounted dir or dir does not exists" + fi + cd $curdir + __check_included_image 'ECS' if [ $? -eq 1 ]; then echo -e $RED"The ECS image has not been checked for this test run due to arg to the test script"$ERED