From 5db191bf318a6932cd4b4f04937c2279d8c4a093 Mon Sep 17 00:00:00 2001 From: git user on spce Date: Wed, 3 Jul 2013 10:31:54 +0200 Subject: [PATCH] Changed BASE_DIR. Delete LOG_DIR and RESULT_DIR at the begining. Remove domain if error on check. --- run_tests.sh | 8 ++++++-- scenarios/check.sh | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) 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"