From f88bfa588a3c808a9afdbbcf4d985fcd77579fb6 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Tue, 15 Jan 2019 18:08:14 +0100 Subject: [PATCH] TT#50152 Fix re-transmission issues in cases where only part of the json are duplicated Change-Id: I4a522a0935a76eca0a78776c1a6f3cf91c654502 --- run_tests.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index dc1e3d79..472a266c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -126,10 +126,19 @@ fix_retransmissions() { if ! [ -a "${next_json_file}" ] ; then continue fi + # Check if both sip_in and Sip_out are equals if ( diff -q -u <(tail -n3 "${json_file}") <(tail -n3 "${next_json_file}") &> /dev/null ) ; then - echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") ---> renaming the file in $(basename "${next_json_file}")_retransmission" + echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") (case 1) ---> renaming the file in $(basename "${next_json_file}")_retransmission" mv -f "${next_json_file}" "${next_json_file}_retransmission" RETRANS_ISSUE=true + continue + fi + # Check if only sip_in is equal + if ( diff -q -u <(tail -n3 "${json_file}" | sed -n 1p) <(tail -n3 "${next_json_file}" | sed -n 1p) &> /dev/null ) ; then + echo "$(date) - - - $(basename "${next_json_file}") seems a retransmission of $(basename "${json_file}") (case 2) ---> renaming the file in $(basename "${next_json_file}")_retransmission" + mv -f "${next_json_file}" "${next_json_file}_retransmission" + RETRANS_ISSUE=true + continue fi done done