From 08fda6ea42bf355bc087bf99883b588e80952d37 Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 10 Jul 2018 16:58:11 +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: I532dc11528dfa1e9f566e3a2c860fd62a56418b3 --- .gitignore | 2 +- .stestr.conf | 4 ++++ .testr.conf | 7 ------- lower-constraints.txt | 2 +- requirements.txt | 28 ++++++++++++++-------------- test-requirements.txt | 18 +++++++++--------- tox.ini | 2 +- 7 files changed, 30 insertions(+), 33 deletions(-) create mode 100644 .stestr.conf delete mode 100755 .testr.conf diff --git a/.gitignore b/.gitignore index 4cb15495..722011d4 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ ChangeLog #Autogenerated sample config file etc/muranoagent/muranoagent.conf.sample -/.testrepository/ +.stestr/ #swap file *.swp diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..0a8cbfed --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./muranoagent/tests/unit +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100755 index 4da4d7db..00000000 --- a/.testr.conf +++ /dev/null @@ -1,7 +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 $DISCOVER_DIRECTORY $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index dee1dbba..56f1cd22 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -75,7 +75,7 @@ snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 -testrepository==0.0.20 +stestr==2.0.0 testtools==2.3.0 traceback2==1.4.0 unittest2==1.1.0 diff --git a/requirements.txt b/requirements.txt index 2e343e25..6e8a03aa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,17 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr!=2.1.0 # Apache-2.0 -anyjson # BSD -eventlet!=0.18.3,!=0.20.1,!=0.21.0 # MIT -GitPython # BSD License (3 clause) -kombu!=4.0.2 # BSD -oslo.config!=4.3.0,!=4.4.0 # Apache-2.0 -oslo.log # Apache-2.0 -oslo.service!=1.28.1 # Apache-2.0 -oslo.utils # Apache-2.0 -PyYAML # MIT -six # MIT -semantic-version # BSD -requests # Apache-2.0 -cryptography!=2.0 # BSD/Apache-2.0 +pbr>=3.1.1 # Apache-2.0 +anyjson>=0.3.3 # BSD +eventlet>=0.20.0,!=0.20.1,!=0.21.0 # MIT +GitPython>=2.1.8 # BSD License (3 clause) +kombu>=4.1.0 # BSD +oslo.config>=5.2.0 # Apache-2.0 +oslo.log>=3.37.0 # Apache-2.0 +oslo.service>=1.30.0 # Apache-2.0 +oslo.utils>=3.36.0 # Apache-2.0 +PyYAML>=3.12 # MIT +six>=1.11.0 # MIT +semantic-version>=2.6.0 # BSD +requests>=2.18.4 # Apache-2.0 +cryptography>=2.1.4 # BSD/Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 07daa38a..8e82374a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,14 +2,14 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 -unittest2 # BSD -coverage!=4.4 # Apache-2.0 -mock # BSD -testtools # MIT -testrepository # Apache-2.0/BSD -oslotest # Apache-2.0 +unittest2>=1.1.0 # BSD +coverage>=4.5.1 # Apache-2.0 +mock>=2.0.0 # BSD +testtools>=2.3.0 # MIT +stestr>=2.0.0 # Apache-2.0 +oslotest>=3.3.0 # Apache-2.0 # doc build requirements -openstackdocstheme # Apache-2.0 -sphinx!=1.6.6,!=1.6.7 # BSD -reno # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=1.6.5,!=1.6.6,!=1.6.7 # BSD +reno>=2.7.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index c6843aef..2f662722 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstac deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --slowest --testr-args='{posargs}' + stestr run --slowest {posargs} whitelist_externals = bash find