TT#81700 store sipp message log per execution

* bin/sipp.sh: add -l option to activate message logging and define log name
* bin/check.sh: use -l option when relevant passing proper filename
* .gitignore: ignore .msg files

Change-Id: Ida7ae612cdf7f0cf2c1e5c1c8e688de765b366df
mr9.4
Victor Seva 5 years ago
parent 2e1ac48bbd
commit bcced8edae
No known key found for this signature in database
GPG Key ID: B1589889727198E0

1
.gitignore vendored

@ -8,6 +8,7 @@ mem
scenario_ids.yml
sipp_scenario_responder*_reg.xml
*errors.log
*.msg
*.csv
presence_*xml
presence.sh

@ -636,6 +636,7 @@ run_sipp() {
-r "${SCEN_CHECK_DIR}/${base}_reg.xml"
fi
pid=$("${BIN_DIR}/sipp.sh" -b -T "$transport" -i "${ip}" -p "${PORT}" \
-l "${LOG_DIR}/${base}.msg" \
-m "${MPORT}" -r "${SCEN_CHECK_DIR}/${base}.xml")
echo "$(date) - Running ${base}[${pid}] ${ip}:${PORT}-${MPORT}"
responder_pid="${responder_pid} ${base}:${pid}"
@ -658,7 +659,7 @@ run_sipp() {
PORT=$(check_port )
MPORT=$(check_mport )
echo "$(date) - Running ${base} $ip:51602-45003"
if ! "${BIN_DIR}/sipp.sh" -T "${transport}" -i "${ip}" -p 51602 -m 45003 "${send}" ; then
if ! "${BIN_DIR}/sipp.sh" -l "${LOG_DIR}/${base}.msg" -T "${transport}" -i "${ip}" -p 51602 -m 45003 "${send}" ; then
echo "$(date) - ${base} error"
status=1
fi

@ -28,11 +28,12 @@ usage() {
echo -e "\\t-T: transport [UDP|TCP] default UDP"
echo -e "\\t-r: responder"
echo -e "\\t-b: run sipp in background (responder)"
echo -e "\\t-l: log_message_file"
echo "Arguments:"
echo -e "\\t sipp_scenario.xml file"
}
while getopts 'hrp:m:t:i:T:b' opt; do
while getopts 'hrp:m:t:i:T:bl:' opt; do
case $opt in
h) usage; exit 0;;
r) RESP=1;;
@ -42,6 +43,7 @@ while getopts 'hrp:m:t:i:T:b' opt; do
i) IP=$OPTARG;;
T) TRANSPORT=${OPTARG,,};;
b) BACK="-bg";;
l) LOG_FILE=${OPTARG};;
*) usage; exit 0;;
esac
done
@ -62,6 +64,10 @@ IP=${IP:-"127.0.0.1"}
IP_SERVER=${IP_SERVER:-"127.0.0.1"}
MAX="5000"
if [ -n "${LOG_FILE}" ]; then
MSG_LOG="-trace_msg -message_file ${LOG_FILE}"
fi
if [ "${TRANSPORT}" == "tcp" ]; then
TRANSPORT_ARG="-t t1"
else
@ -76,7 +82,7 @@ if [ -z "${RESP}" ]; then
PORT=${PORT:-"50602"}
TIMEOUT=${TIMEOUT:-"15"}
sipp -max_socket $MAX ${TRANSPORT_ARG}\
sipp -max_socket $MAX ${TRANSPORT_ARG} ${MSG_LOG} \
-inf "${BASE_DIR}/callee.csv" -inf "${BASE_DIR}/caller.csv" \
-sf "$1" -i "$IP" -p "$PORT" \
-nr -nd -m 1 ${MPORT_ARG} \
@ -91,7 +97,7 @@ else
TIMEOUT=${TIMEOUT:-"25"}
if [ -z "${BACK}" ]; then
sipp -max_socket $MAX ${TRANSPORT_ARG}\
sipp -max_socket $MAX ${TRANSPORT_ARG} ${MSG_LOG} \
-inf "${BASE_DIR}/callee.csv" -inf "${BASE_DIR}/caller.csv" \
-sf "$1" -i "$IP" -p "$PORT" \
-nr -nd -m 1 ${MPORT_ARG} \
@ -99,7 +105,7 @@ else
"$IP_SERVER" &> /dev/null
status=$?
else
tmp=$(sipp $BACK -max_socket $MAX ${TRANSPORT_ARG}\
tmp=$(sipp $BACK -max_socket $MAX ${TRANSPORT_ARG} ${MSG_LOG} \
-inf "${BASE_DIR}/callee.csv" -inf "${BASE_DIR}/caller.csv" \
-sf "$1" -i "$IP" -p "$PORT" \
-nr -nd -m 1 ${MPORT_ARG} \

Loading…
Cancel
Save