Still doesn't work as we don't return failure from the Python fails if doctests fail. But the test runner script is correct now.
16 lines
287 B
Bash
Executable File
16 lines
287 B
Bash
Executable File
#!/bin/sh
|
|
PYTHONPATH="Lib:$PYTHONPATH"
|
|
export PYTHONPATH
|
|
TESTS=`git grep -l doctest Lib/`
|
|
ret=0
|
|
for test in $TESTS; do
|
|
echo "Running tests in $test"
|
|
if ! python $test; then
|
|
let ret=ret+1
|
|
fi
|
|
done
|
|
if test $ret != 0; then
|
|
echo "$ret source file(s) had tests failing" >&2
|
|
fi
|
|
exit $ret
|