TT#116101 align sipp checks filename to sipp scenario files

* sipp_scenario00.xml => sipp_scenario00.msg
  sipp_scenario_responder00.xml => sipp_scenario_responder00.msg
  so sipp_scenario00_test.yml.tt2 and sipp_scenario_reponder00_test.yml.tt2
  makes more sense

Change-Id: Iab9db5122774dbc32101195e639ab6fef9b23236
mr10.0
Victor Seva 5 years ago
parent e110dd346b
commit 493423a911

@ -542,18 +542,6 @@ run_sipp() {
fi
}
test_sip_filepath() {
local msg_name
msg_name=${1/_test.yml/.msg}
msg_name=${msg_name/sip_messages/sipp_scenario}
sip_msg="${LOG_DIR}/$(basename "${msg_name}")"
if ! [ -f "${sip_msg}" ]; then
echo "$(date) - WARNING: no sipp log file found! filename=<${sip_msg}>. Skipping."
return 1
fi
return 0
}
test_filepath() {
local msg_name
@ -867,13 +855,13 @@ if [[ ${CHECK_TYPE} != none ]] ; then
if [[ ${CHECK_TYPE} != cfgt ]] ; then
echo "$(date) - ~~~~~"
for t in "${SCEN_CHECK_DIR}"/sip_messages*[0-9][0-9]_test.yml; do
if test_sip_filepath "${t}"; then
echo -n "$(date) - SIP: Check test $(basename "${t}") on ${sip_msg}"
dest=$(basename "${sip_msg}")
dest=${RESULT_DIR}/${dest/.msg/.tap}
check_sip_test "${t}" "$sip_msg" "${dest}"
fi
for t in "${SCEN_CHECK_DIR}"/sipp_scenario*_test.yml; do
msg_name=${t/_test.yml/.msg}
sip_msg="${LOG_DIR}/$(basename "${msg_name}")"
echo -n "$(date) - SIP: Check test $(basename "${t}") on ${sip_msg}"
dest=$(basename "${sip_msg}")
dest=${RESULT_DIR}/${dest/.msg/.tap}
check_sip_test "${t}" "$sip_msg" "${dest}"
done
echo "$(date) - ~~~~~"
fi

@ -18,6 +18,7 @@
# On Debian systems, the complete text of the GNU General
# Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
#
set -e
ERR_FLAG=0
# $1 destination tap file
@ -31,19 +32,6 @@ EOF
echo "$(date) - $(basename "$2") NOT ok"
}
test_sip_filepath() {
local msg_name
msg_name=${1/_test.yml/.msg}
msg_name=${msg_name/sip_messages/sipp_scenario}
msg="${LOG_DIR}/$(basename "${msg_name}")"
if [ -f "${msg}" ]; then
return 0
fi
echo "$(date) - WARNING: no sipp log file found! filename=<${msg}>. Skipping."
return 1
}
# $1 sip message test yml
# $2 sipp msg parsed to .msg log file
# $3 destination tap filename
@ -142,22 +130,21 @@ echo "$(date) - Check [${GROUP}/${PROFILE}]: ${NAME_CHECK}"
mkdir -p "${RESULT_DIR}"
echo "$(date) - Cleaning tests files"
find "${SCEN_CHECK_DIR}" -type f -name '*test.yml' -exec rm {} \;
find "${SCEN_CHECK_DIR}" -type f -name 'sipp_scenario*test.yml' -exec rm {} \;
echo "$(date) - Generating tests files"
"${BIN_DIR}/generate_tests.sh" \
-f 'sip_messages*test.yml.tt2' \
-f 'sipp_scenario*test.yml.tt2' \
-d "${SCEN_CHECK_DIR}" "${LOG_DIR}/scenario_ids.yml" "${PROFILE}"
test_ok=()
for t in "${SCEN_CHECK_DIR}"/sip_messages*[0-9][0-9]_test.yml; do
if test_sip_filepath "${t}"; then
echo -n "$(date) - SIP: Check test $(basename "${t}") on ${msg}"
dest=$(basename "${msg}")
dest=${RESULT_DIR}/${dest/.msg/.tap}
check_sip_test "${t}" "$msg" "${dest}"
fi
done
while read -r t; do
msg_name=${t/_test.yml/.msg}
msg="${LOG_DIR}/$(basename "${msg_name}")"
echo -n "$(date) - SIP: Check test $(basename "${t}") on ${msg}"
dest=$(basename "${msg}")
dest=${RESULT_DIR}/${dest/.msg/.tap}
check_sip_test "${t}" "$msg" "${dest}"
done < <(find "${SCEN_CHECK_DIR}" -maxdepth 1 -name 'sipp_scenario*_test.yml'|sort)
echo "$(date) - ================================================================================="

Loading…
Cancel
Save