Merge "Debug env for tox"

This commit is contained in:
Jenkins 2014-01-14 00:57:03 +00:00 committed by Gerrit Code Review
commit 79ab2dbcac
2 changed files with 23 additions and 0 deletions

18
tools/debug_helper.sh Executable file

@ -0,0 +1,18 @@
#!/bin/bash
TMP_DIR=`mktemp -d` || exit 1
trap "rm -rf $TMP_DIR" EXIT
ALL_TESTS=$TMP_DIR/all_tests
TESTS_TO_RUN=$TMP_DIR/ksc_to_run
python -m testtools.run discover -t ./ ./keystoneclient/tests --list > $ALL_TESTS
if [ "$1" ]
then
grep "$1" < $ALL_TESTS > $TESTS_TO_RUN
else
mv $ALL_TESTS $TESTS_TO_RUN
fi
python -m testtools.run discover --load-list $TESTS_TO_RUN

@ -29,6 +29,11 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:debug]
commands =
{toxinidir}/tools/debug_helper.sh {posargs}
[flake8]
# F821: undefined name
# H304: no relative imports