From f631143f3caf0987f2a3bd057e5ca674891e784c Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 10 Jul 2018 15:04:13 +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: I32db99af179412f46b02ced9eaf61049cbffcdb0 --- .gitignore | 3 +-- .stestr.conf | 4 ++++ .testr.conf | 8 -------- lower-constraints.txt | 3 +-- test-requirements.txt | 2 +- tox.ini | 2 +- 6 files changed, 8 insertions(+), 14 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 53278efb..848e9370 100644 --- a/.gitignore +++ b/.gitignore @@ -37,11 +37,10 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ -.testrepository +.stestr/ .coverage .coverage.* .cache -nosetests.xml coverage.xml *,cover .hypothesis/ diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..396d6977 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./ovsdbapp/tests/unit +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 878cf078..00000000 --- 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_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ovsdbapp/tests} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index d75d9291..5750728f 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -43,9 +43,8 @@ six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 -stestr==1.0.0 stevedore==1.20.0 -testrepository==0.0.18 +stestr==2.0.0 testscenarios==0.4 testtools==2.2.0 traceback2==1.4.0 diff --git a/test-requirements.txt b/test-requirements.txt index d5fd9381..0c759a96 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,7 @@ openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 pylint==1.4.5 # GPLv2 -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 cb2f1893..6193d313 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python2.7