diff --git a/tests/run_tests.sh b/tests/run_tests.sh index babc465d67ff899d6c718b8aa45b0d7de8ec8961..e3317a9a2a1b760f5bd31b05013337a5b27fa908 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -31,33 +31,35 @@ advanced_test_files=( ) # echo -e "\nStarting simple tests ...\n" -# for FILENAME in "${simple_test_files[@]}" -# do -# FILESIZE=$(stat -c%s "$FILENAME") -# echo -e "${BROWN}Sending \"$FILENAME\" \t[$FILESIZE bytes] with Valgrind${NC}" -# ./tests/simple_test.sh $FILENAME +# i=1 +# for FILENAME in "${simple_test_files[@]}"; do +# FILESIZE=$(stat -c%s "$FILENAME") +# echo -e "${BROWN}($i/${#simple_test_files[@]}) Sending \"$FILENAME\" \t[$FILESIZE bytes] with Valgrind${NC}" +# ./tests/simple_test.sh $FILENAME -# if [ $? -ne 0 ]; then -# echo "Tests terminated cause of a failed test" -# exit 0 -# fi +# if [ $? -ne 0 ]; then +# echo "Tests terminated cause of a failed test" +# exit 0 +# fi +# let i++ # done -# echo -e "Finished Simple tests." +echo -e "Finished Simple tests." if [ -d linksimulator/ ]; then echo -e "\nStarting advanced tests ...\n" # Now we ran the advanced tests - for FILENAME in "${advanced_test_files[@]}" - do + i=1 + for FILENAME in "${advanced_test_files[@]}"; do FILESIZE=$(stat -c%s "$FILENAME") - echo -e "\n${BROWN}Sending the file \"$FILENAME\" \t[$FILESIZE bytes] with linksimulator and Valgrind${NC}" + echo -e "\n${BROWN}($i/${#advanced_test_files[@]}) Sending the file \"$FILENAME\" \t[$FILESIZE bytes] with linksimulator and Valgrind${NC}" ./tests/advanced_test.sh $FILENAME if [ $? -ne 0 ]; then echo "Tests terminated cause of a failed test" exit 0 - fi + fi + let i++ done echo "Finished Advanced tests." else