issue 355: Only run tests in mediagoblin/tests/
If you don't give an option argument (starting with a dash) to runtests.sh then it will append the directory with all the tests to the commandline of nosetests. That way it will only search there for tests.
This commit is contained in:
parent
a3b98853df
commit
7dec9f92f3
27
runtests.sh
27
runtests.sh
@ -28,4 +28,29 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_tests $NOSETESTS $@
|
||||
need_arg=1
|
||||
for i in "$@"
|
||||
do
|
||||
case "$i" in
|
||||
-*) ;;
|
||||
*) need_arg=0; break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_tests
|
||||
export CELERY_CONFIG_MODULE
|
||||
|
||||
if [ "$need_arg" = 1 ]
|
||||
then
|
||||
dir="`dirname $0`"/mediagoblin/tests
|
||||
[ '!' -d "$dir" ] && dir=./mediagoblin/tests
|
||||
if [ '!' -d "$dir" ]
|
||||
then
|
||||
echo "Cound not find tests dir"
|
||||
exit 1
|
||||
fi
|
||||
$NOSETESTS "$@" "$dir"
|
||||
else
|
||||
$NOSETESTS "$@"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user