diff --git a/.gitignore b/.gitignore index d2b698d4..37448012 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,6 @@ doc/source/reference/api/* doc/build/* dist designateclient/versioninfo -.testrepository +.stestr/ *.log -.idea/ \ No newline at end of file +.idea/ diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..86a8dc71 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./designateclient/tests} +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 5325b9e7..00000000 --- a/.testr.conf +++ /dev/null @@ -1,10 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - OS_DEBUG=${OS_DEBUG:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./designateclient/tests} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index 14ba9020..a380f86b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -68,10 +68,9 @@ requestsexceptions==1.2.0 rfc3986==0.3.1 simplejson==3.5.1 six==1.10.0 -stestr==1.0.0 stevedore==1.20.0 tempest==17.1.0 -testrepository==0.0.18 +stestr==2.0.0 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 diff --git a/test-requirements.txt b/test-requirements.txt index fb347d09..c619d210 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,6 +10,6 @@ oslotest>=3.2.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD requests-mock>=1.2.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0 diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh deleted file mode 100755 index 0fc36053..00000000 --- a/tools/pretty_tox.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -TESTRARGS=$1 - -exec 3>&1 -status=$(exec 4>&1 >&3; ( python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | subunit-trace -f) && exit $status diff --git a/tox.ini b/tox.ini index cb3f9079..150608f0 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,7 @@ whitelist_externals = find commands = find . -type f -name "*.pyc" -delete - sh tools/pretty_tox.sh '{posargs}' + stestr run --slowest {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:docs] @@ -46,7 +46,13 @@ commands = flake8 [testenv:cover] basepython = python3 -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + PYTHON=coverage run --source designateclient --parallel-mode +commands = + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] basepython = python3