diff --git a/tests/run_sender_receiver.sh b/tests/run_sender_receiver.sh index b7f5a82345a852a3d9c2fde74a9f22b7589522c6..f0ebe4b7344b6e986d8f3aed75be6028200a655d 100755 --- a/tests/run_sender_receiver.sh +++ b/tests/run_sender_receiver.sh @@ -4,6 +4,26 @@ GREEN='\033[0;32m' RED='\033[0;31m' NC='\033[0m' +################################################## +# General script (function) for running any test # +################################################## + +# - Arguments: +# $1: Sender executable file (relative path from the directory where the Makefile is located) +# $2: Receiver executable file (relative path from the directory where the Makefile is located) +# $3: file used for the test (relative path from the directory where the Makefile is located) + needs "/" at the end +# $4: subdirectory in the 'tests_logs/' where the log files are stored +# $5: must either be 'with_FEC' or 'without_FEC' +# +# All of the following arguments are optionals (of they are not present, it run without the link simulator) +# $6: ERROR_RATE +# $7: CUT_RATE +# $8: DELAY +# $9: JITTER +# $10: LOSS_RATE +# +# $11: (optional) a subsubdirectory of 'test_logs/' where the log files are stored + sender=$1 sender_name="${sender##*/}" receiver=$2 @@ -47,7 +67,8 @@ if [ -d "${DIR}" ]; then fi mkdir "${DIR}" 2>/dev/null -echo -e "\nSimulation ${mode}" +echo -e "\n[INFO] The resulting files are located in \"${DIR}\"" +echo -e "[MODE] ${mode}" # Checking if we're using the linksimulator or not if [ "$#" -gt 6 ]; then