forked from fortra/impacket
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Run misc tests instead of __main__ in related modules
- Loading branch information
Colin Hogben
committed
Dec 6, 2018
1 parent
50d5826
commit 30f9f93
Showing
3 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
FOR /f "tokens=*" %%G IN ('dir /B *.py') DO %%G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
separator='======================================================================' | ||
|
||
export PYTHONPATH=../..:$PYTHONPATH | ||
|
||
if [ $# -gt 0 ] | ||
then | ||
# Only run coverage when called by tox | ||
RUN="coverage run --append --rcfile=../coveragerc " | ||
else | ||
RUN=python | ||
fi | ||
|
||
total=0 | ||
ok=0 | ||
failed=0 | ||
for file in `ls *.py` ; do | ||
echo $separator | ||
echo Executing $RUN $file | ||
latest=$( | ||
$RUN $file 2>&1 | { | ||
while read line; do | ||
echo " $line" 1>&2 | ||
latest="$line" | ||
done | ||
echo $latest | ||
} | ||
) | ||
#echo Latest ${latest} | ||
result=${latest:0:6} | ||
if [ "$result" = "FAILED" ] | ||
then | ||
(( failed++ )) | ||
elif [ "$result" = "OK" ] | ||
then | ||
(( ok++ )) | ||
fi | ||
|
||
(( total++ )) | ||
done | ||
echo $separator | ||
echo Summary: | ||
echo " OK $ok/$total" | ||
echo " $failed FAILED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters