mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Merge pull request #33 from olof/topic/runtests_improvements
Improvements to the run-tests.sh script
This commit is contained in:
commit
80796c5034
6
Makefile
6
Makefile
@ -14,3 +14,9 @@ install: svtplay-dl
|
||||
svtplay-dl: lib/svtplay_dl/*py lib/svtplay_dl/fetcher/*py lib/svtplay_dl/service/*py
|
||||
cd lib; $(MAKE)
|
||||
mv lib/svtplay-dl .
|
||||
|
||||
test:
|
||||
sh run-tests.sh
|
||||
|
||||
pylint:
|
||||
find lib -name '*.py' -a '!' -path '*/tests/*' | xargs pylint
|
||||
|
28
run-tests.sh
28
run-tests.sh
@ -1,2 +1,28 @@
|
||||
#!/bin/sh
|
||||
PYTHONPATH=lib nosetests --all-modules
|
||||
|
||||
OPTS='--all-modules '
|
||||
|
||||
die() {
|
||||
echo Error: "$@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case $1 in
|
||||
-c|--coverage)
|
||||
OPTS="$OPTS --with-coverage"
|
||||
;;
|
||||
-v|--verbose)
|
||||
OPTS="$OPTS --verbose"
|
||||
;;
|
||||
-*)
|
||||
die "Unknown option: '$1'"
|
||||
;;
|
||||
*)
|
||||
die "Unknown argument: '$1'"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
PYTHONPATH=lib nosetests $OPTS
|
||||
|
Loading…
Reference in New Issue
Block a user