Helps to execute manually the tests. So run_tests.sh can be called several times with -C options, skipping the config * wrap-and-sort -sat Change-Id: Id1426234a8fce3f0592016e2361d40ce256390afchanges/41/36441/2
parent
987011ddef
commit
f75d15547b
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
RUN_DIR="$(dirname "$0")"
|
||||
export BASE_DIR=${BASE_DIR:-$RUN_DIR}
|
||||
# Set up the environment, to use local perl modules
|
||||
export PERL5LIB="${BASE_DIR}/lib"
|
||||
BIN_DIR="${BASE_DIR}/bin"
|
||||
GROUP="${GROUP:-scenarios}"
|
||||
DOMAIN="spce.test"
|
||||
|
||||
usage() {
|
||||
echo "Usage: set_config.sh [-h] [-x GROUP]"
|
||||
echo "Options:"
|
||||
echo -e "\t-x set GROUP scenario. Default: scenarios"
|
||||
echo -e "\t-h this help"
|
||||
|
||||
echo "BASE_DIR:${BASE_DIR}"
|
||||
echo "BIN_DIR:${BIN_DIR}"
|
||||
}
|
||||
|
||||
while getopts 'hx:' opt; do
|
||||
case $opt in
|
||||
h) usage; exit 0;;
|
||||
x) GROUP=${OPTARG};;
|
||||
*) echo "Unknown option ${opt}"; usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
error_flag=0
|
||||
|
||||
echo "$(date) - Removed apicert.pem"
|
||||
rm -f "${BASE_DIR}/apicert.pem"
|
||||
echo "$(date) - Setting config debug on"
|
||||
"${BIN_DIR}/config_debug.pl" -g "${GROUP}" on ${DOMAIN}
|
||||
if ! ngcpcfg apply "config debug on via kamailio-config-tests" ; then
|
||||
echo "$(date) - ngcpcfg apply returned $?"
|
||||
error_flag=4
|
||||
fi
|
||||
echo "$(date) - Setting config debug on. Done[${error_flag}]"
|
||||
|
||||
exit ${error_flag}
|
||||
|
||||
Loading…
Reference in new issue