fonttools/run-tests.sh

18 lines
361 B
Bash
Raw Normal View History

2015-03-03 09:57:41 -08:00
#!/bin/sh
2015-04-07 18:26:13 -07:00
cd Lib
PYTHONPATH=".:$PYTHONPATH"
export PYTHONPATH
TESTS=`git grep -l -e doctest -e unittest`
ret=0
for test in $TESTS; do
echo "Running tests in $test"
2015-04-07 18:26:13 -07:00
test=`echo "$test" | sed 's@[/\\]@.@g;s@[.]py$@@'`
if ! python -m $test -v; then
ret=$((ret+1))
fi
done
if test $ret != 0; then
echo "$ret source file(s) had tests failing" >&2
fi
exit $ret