diff --git a/tools/debug_helper.sh b/tools/debug_helper.sh new file mode 100755 index 0000000000..64088f5281 --- /dev/null +++ b/tools/debug_helper.sh @@ -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/ks_to_run + +python -m testtools.run discover -t ./ ./keystone/tests --list > $ALL_TESTS + +if [ "$1" ] +then + grep "$1" < $ALL_TESTS > $TESTS_TO_RUN +else + mv $ALL_TESTS $TESTS_TO_RUN +fi + +STANDARD_THREADS=1 python -m testtools.run discover --load-list $TESTS_TO_RUN diff --git a/tox.ini b/tox.ini index b251d479ba..5edb28be45 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,11 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:venv] commands = {posargs} +[testenv:debug] + +commands = + {toxinidir}/tools/debug_helper.sh {posargs} + [flake8] filename= *.py,keystone-* show-source = true