Report failing modules
This commit is contained in:
parent
dfe0b85b9d
commit
801dcf21d6
11
run-tests.sh
11
run-tests.sh
@ -26,14 +26,21 @@ test "x$FILTER" = "x" && FILTER=.
|
||||
TESTS=`grep -r --include='*.py' -l -e doctest -e unittest * | grep -E "$FILTER"`
|
||||
|
||||
ret=0
|
||||
FAILS=
|
||||
for test in $TESTS; do
|
||||
echo "Running tests in $test"
|
||||
test=`echo "$test" | sed 's@[/\\]@.@g;s@[.]py$@@'`
|
||||
if ! $PYTHON -m $test -v; then
|
||||
ret=$((ret+1))
|
||||
FAILS="$FAILS
|
||||
$test"
|
||||
fi
|
||||
done
|
||||
if test $ret != 0; then
|
||||
echo "$ret source file(s) had tests failing" >&2
|
||||
echo
|
||||
echo "SUMMARY:"
|
||||
if test $ret = 0; then
|
||||
echo "All tests passed."
|
||||
else
|
||||
echo "$ret source file(s) had tests failing:$FAILS" >&2
|
||||
fi
|
||||
exit $ret
|
||||
|
Loading…
x
Reference in New Issue
Block a user