diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..ad6d5f7a --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${TESTS_DIR:-./proliantutils/tests/} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 48977727..00000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./proliantutils/tests/} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/tox.ini b/tox.ini index 974d5ce8..ae8d0c16 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir} LC_ALL=en_US.UTF-8 TESTS_DIR=./proliantutils/tests/ deps = -r{toxinidir}/test-requirements.txt -commands = ostestr {posargs} +commands = stestr run {posargs} [testenv:pep8] basepython = python2.7 @@ -25,10 +25,15 @@ commands = # in your browser, to see a nicer presentation report with annotated # HTML listings detailing missed lines. basepython = python2.7 -deps = {[testenv]deps} -commands = coverage erase - python setup.py testr --coverage --omit='*test*' --testr-args='{posargs}' - coverage report --omit=*test* +setenv = VIRTUAL_ENV={envdir} + LANGUAGE=en_US + PYTHON=coverage run --source proliantutils --omit='*tests*' --parallel-mode +commands = + coverage erase + stestr run {posargs} + coverage combine + coverage report --omit='*tests*' + coverage html -d ./cover --omit='*tests*' [flake8] # Exclude MIB directories from flake8/pep8 tests as these are