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