Skip to content
Extraits de code Groupes Projets
Valider 613d8097 rédigé par Samuel de Meester de Ravestein's avatar Samuel de Meester de Ravestein
Parcourir les fichiers

cleaner display of the tests output ?

parent e649e421
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -27,6 +27,17 @@ MODES=(
'without_FEC'
)
ERROR_RATE=20
CUT_RATE=30
DELAY=0
JITTER=0
LOSS_RATE=25
echo -e "The linksimulator paramateres are:
\t\t-ERROR RATE: ${ERROR_RATE}% \t-DELAY: ${DELAY}ms
\t\t-CUT RATE: ${CUT_RATE}% \t-JITTER: ${JITTER}ms
\t\t-LOSS RATE: ${LOSS_RATE}%\n"
for MODE in "${MODES[@]}"; do
mkdir "${TEST_OUTPUT_FILES}/${MODE}/" 2>/dev/null
......@@ -45,11 +56,12 @@ for MODE in "${MODES[@]}"; do
port1=$(comm -23 <(seq 65000 65200 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
port2=$(comm -23 <(seq 65000 65200 | sort) <(ss -Htan | awk '{print $4}' | cut -d':' -f2 | sort -u) | shuf | head -n 1)
# We first launch the link simulator
./linksimulator/link_sim -p $port2 -P $port1 -l 25 -d 0 -e 20 -c 30 \
##### Launching the link simulator #####
./linksimulator/link_sim -p $port2 -P $port1 -l $LOSS_RATE -d $DELAY -e $ERROR_RATE -c $CUT_RATE -j $JITTER \
&>${DIR}/adv_${BSN_PRE}_link.log & link_pid=$!
# We launch the receiver and capture its output
##### Launching the receiver and capturinig its output #####
valgrind --leak-check=full --log-file=${DIR}/adv_valgrind_${BSN_PRE}_receiver.log \
./receiver ::1 $port1 -s ${DIR}/${BSN_PRE}_receiver_stats.csv 1> ${DIR}/adv_${BSN_PRE}_received_file.${BSN_EXT} \
2> ${DIR}/adv_${BSN_PRE}_receiver.log & receiver_pid=$!
......
#!/bin/bash
BROWN='\033[0;33m'
NC='\033[0m'
# Note that this assumes to be called from the Makefile, you may want to adapt it.
FILESIZE=""
TEST_FILES_DIR=./tests_files/
......@@ -19,7 +22,7 @@ fi
#for FILENAME in "$TEST_FILES_DIR"/*
#do
# FILESIZE=$(stat -c%s "$FILENAME")
# echo -e "Sending $FILENAME \t\t [$FILESIZE bytes], \t\t with Valgrind"
# echo -e "${BROWN}Sending \"$FILENAME\" \t[$FILESIZE bytes] with Valgrind${NC}"
# ./tests/simple_test.sh $FILENAME
# if [ $? -ne 0 ]; then
......@@ -36,7 +39,7 @@ if [ -d linksimulator/ ]; then
for FILENAME in "$TEST_FILES_DIR"/*
do
FILESIZE=$(stat -c%s "$FILENAME")
echo -e "Sending $FILENAME \t\t [$FILESIZE bytes], \t\t with linksimulator and Valgrind"
echo -e "\n${BROWN}Sending the file \"$FILENAME\" \t[$FILESIZE bytes] with linksimulator and Valgrind${NC}"
./tests/advanced_test.sh $FILENAME
if [ $? -ne 0 ]; then
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter