github.com/n00py/Slackor@v0.0.0-20200610224921-d007fcea1740/impacket/tests/dot11/runalltestcases.sh (about) 1 #!/bin/bash 2 separator='======================================================================' 3 export PYTHONPATH=../..:$PYTHONPATH 4 5 if [ $# -gt 0 ] 6 then 7 # Only run coverage when called by tox 8 RUN="python -m coverage run --append --rcfile=../coveragerc " 9 else 10 RUN=python 11 fi 12 13 total=0 14 ok=0 15 failed=0 16 for file in `ls *.py` ; do 17 echo $separator 18 echo Executing $file 19 latest=$( 20 $RUN $file 2>&1 | { 21 while read line; do 22 echo " $line" 1>&2 23 latest="$line" 24 done 25 echo $latest 26 } 27 ) 28 #echo Latest ${latest} 29 result=${latest:0:6} 30 if [ "$result" = "FAILED" ] 31 then 32 (( failed++ )) 33 elif [ "$result" = "OK" ] 34 then 35 (( ok++ )) 36 else 37 echo "WARNING: Unknown result!!!!!" 38 (( failed++ )) 39 fi 40 41 (( total++ )) 42 done 43 echo $separator 44 echo Summary: 45 echo " OK $ok/$total" 46 echo " $failed FAILED"