diff --git a/run_tests.sh b/run_tests.sh index a8805a74..f596b7cb 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,5 +1,7 @@ #!/bin/bash -BASE_DIR="/usr/local/src/log_parser" +BASE_DIR="/usr/local/src/kamailio-config-tests" +LOG_DIR="${BASE_DIR}/log" +RESULT_DIR="${BASE_DIR}/result" while getopts 'ct' opt; do case $opt in @@ -13,7 +15,9 @@ if [ -z $SKIP ]; then ngcpcfg apply fi -rm -rf ${BASE_DIR}/result/* +for i in ${LOG_DIR} ${RESULT_DIR}; do + rm -rf $i +done for t in $(find ${BASE_DIR}/scenarios/ -depth -maxdepth 1 -mindepth 1 -type d ); do echo "Run: $(basename $t)" diff --git a/scenarios/check.sh b/scenarios/check.sh index cd110d5c..fa60daa5 100755 --- a/scenarios/check.sh +++ b/scenarios/check.sh @@ -60,6 +60,7 @@ function run_sipp # we dont want to remove "/*" don't we? if [ -z ${LOG_DIR} ]; then echo "LOG_DIR empty" + delete_voip ${DOMAIN} exit 1 fi rm -rf ${LOG_DIR} @@ -75,6 +76,7 @@ function run_sipp if [[ $status -ne 0 ]]; then echo "error in sipp" find ${SCEN_CHECK_DIR}/ -type f -name 'sipp_scenario*errors.log' -exec mv {} ${LOG_DIR} \; + delete_voip ${DOMAIN} exit 2 fi @@ -95,7 +97,7 @@ if [[ $# != 1 ]]; then fi NAME_CHECK="$1" -BASE_DIR="/usr/local/src/log_parser" +BASE_DIR="/usr/local/src/kamailio-config-tests" LOG_DIR="${BASE_DIR}/log/${NAME_CHECK}" RESULT_DIR="${BASE_DIR}/result/${NAME_CHECK}" KAM_LOG="/var/log/ngcp/kamailio-proxy.log"