From 91ab5ff372ccefccb2f3260eb3bcd5bad51d6daf Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 10 Jul 2018 15:51:34 +0700 Subject: [PATCH] Switch to stestr According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: I02e33d429154936db9ca65b4fd04cfa10754507b --- .gitignore | 2 +- .stestr.conf | 4 ++++ .testr.conf | 8 -------- test-requirements.txt | 2 +- tox.ini | 5 +---- 5 files changed, 7 insertions(+), 14 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 0a06d65..3d307b5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ build/ *.pyc *.swp .venv -.testrepository +.stestr/ .tox # pbr-generated stuff diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..90a59c9 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./os_traits/tests +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 975a461..0000000 --- a/.testr.conf +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./os_traits/tests} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 8ad5962..47c128f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,6 +7,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD oslotest>=3.2.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 26940c9..a0a7ce9 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ whitelist_externals = deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:pep8] commands = flake8 {posargs} @@ -17,9 +17,6 @@ commands = flake8 {posargs} [testenv:venv] commands = {posargs} -[testenv:cover] -commands = python setup.py test --coverage --testr-args='{posargs}' - [testenv:docs] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}