From 203251d7ddd434660abefcc733e9518e367a7c98 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 19 Sep 2017 16:50:18 -0500 Subject: [PATCH] Add .stestr.conf configuration os-testr has moved over to use stestr instead of testr. While this is usually compaible with existing settings, there is a warning that is emitted when .stestr.conf is not present. It is usually able to fall back to parsing the .testr.conf file, but to be more correct and to prevent future problems we should update the config. Change-Id: If553a64f5dded2d47025c947a91f13091f3f5d14 --- .stestr.conf | 3 +++ .testr.conf | 4 ---- tox.ini | 13 +++++++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..96e0ee9be --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./cinderclient/tests/unit} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 2f5f5031f..000000000 --- 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} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./cinderclient/tests/unit} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/tox.ini b/tox.ini index 3e75d5171..cf6af856b 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,10 @@ setenv = VIRTUAL_ENV={envdir} BRANCH_NAME=master CLIENT_NAME=python-cinderclient + OS_TEST_PATH=./cinderclient/tests/unit + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 passenv = *_proxy *_PROXY deps = -r{toxinidir}/requirements.txt @@ -33,9 +37,14 @@ whitelist_externals = bash commands = {posargs} [testenv:cover] +setenv = + {[testenv]setenv} + PYTHON=coverage run --source cinderclient --parallel-mode commands = - python setup.py testr --coverage --testr-args='{posargs}' - coverage report + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] commands=