From 6f6e07eba7048308c8b980310893b183efdc0a0c Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 20 Dec 2019 13:44:51 +0100 Subject: [PATCH] TT#42858 add support for checking retransmissions Add 'retrans: true' to the test.yml file and name it '_test_retransmission.yml.tt2' instead of '_test.yml.tt2' Change-Id: I2e83f773ed8a1ba537aedb61410db79fecbecf16 --- README | 4 ++++ bin/check.sh | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README b/README index 94618db5..94f02551 100644 --- a/README +++ b/README @@ -148,6 +148,10 @@ The test file is divided in tree different parts: [0] https://docs.python.org/3/library/re.html#regular-expression-syntax + - retrans: + boolean value indicating if this test is meant for a retransmission. + It's optional, default is false + Cdr test file syntax (cdr_test.yml.tt2): ---------------------------------------- diff --git a/bin/check.sh b/bin/check.sh index 5ae9bc5c..a4285738 100755 --- a/bin/check.sh +++ b/bin/check.sh @@ -588,6 +588,14 @@ test_filepath() { if ! "${JSON_KAM}" ; then msg_name=${1/_test.yml/.yml} else + if grep -q '^retrans: true' "${1}"; then + echo "$(date) - Detected a test for a retransmission" + msg_name=${1/_test_retransmission.yml/.json_retransmission} + msg="${LOG_DIR}/$(basename "${msg_name}")" + if [ -f "${msg}" ]; then + return + fi + fi msg_name=${1/_test.yml/.json} fi msg="${LOG_DIR}/$(basename "${msg_name}")" @@ -874,7 +882,7 @@ if ! "${SKIP_TESTS}" ; then "${BIN_DIR}/generate_tests.sh" -d \ "${SCEN_CHECK_DIR}" "${LOG_DIR}/scenario_ids.yml" "${PROFILE}" - for t in ${SCEN_CHECK_DIR}/[0-9][0-9][0-9][0-9]_test.yml; do + for t in ${SCEN_CHECK_DIR}/[0-9][0-9][0-9][0-9]_test*.yml; do test_filepath "${t}" echo "$(date) - Check test ${t} on ${msg}" dest=${RESULT_DIR}/$(basename "${t}" .yml)