TT#72700 add set_config.sh helper script

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: Id1426234a8fce3f0592016e2361d40ce256390af
changes/41/36441/2
Victor Seva 7 years ago
parent 987011ddef
commit f75d15547b

@ -5,7 +5,7 @@ Requiriments:
-------------
- A working NGCP
- sip-tester. sipp with ssl enabled ( needed for auth ).
We provide a version backported to wheezy
We provide a version backported
See debian/control for the actual list of dependences
@ -51,14 +51,13 @@ Usage:
#bash ./run_tests.sh [-p PROFILE ] [-K] [-c] [-r] -x scenarios_lnp
#bash ./get_results.sh [-p PROFILE ] [-g] [-c] [-r] -x scenarios_lnp
If you want to run test manually just exec this onces:
#./bin/config_debug.pl on
#ngcpcfg apply 'cfgtest'
If you want to run test manually just exec this once:
#bash ./set_config.sh [-x GROUP]
and run the check that you want:
#PERL5LIB="$$(pwd)/lib" ./bin/check.sh <checkname>
#bash PERL5LIB="$(pwd)/lib" ./bin/check.sh <checkname>
this will run the test and the result taps
or run all the tests as many times you want with:
#./bin/bench.sh $NUM
#bash ./bin/bench.sh $NUM
If you want to test just a set of scenarios, set the SCENARIOS
environment var.

2
debian/control vendored

@ -31,9 +31,9 @@ Depends:
libyaml-libyaml-perl,
ngcp-provisioning-tools,
parallel,
python3:any,
python3-pyinotify,
python3-yaml,
python3:any,
sip-tester (>= 1:3.3-1~),
tcpdump,
${misc:Depends},

@ -6,4 +6,5 @@ run_tests.sh /usr/share/kamailio-config-tests/
scenarios/ /usr/share/kamailio-config-tests/
scenarios_lnp /usr/share/kamailio-config-tests/
scenarios_pbx /usr/share/kamailio-config-tests/
set_config.sh /usr/share/kamailio-config-tests/
sounds /usr/share/kamailio-config-tests/

@ -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…
Cancel
Save