From e76f2a5f90a41c6659607256bbaa72ef90394a4c Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Mon, 9 Jul 2018 13:54:45 +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: I8b0f96f05799b892acfae03522726c17010f0df3 --- .gitignore | 1 - .stestr.conf | 3 +++ .testr.conf | 7 ------- requirements.txt | 46 +++++++++++++++++++++---------------------- test-requirements.txt | 32 +++++++++++++++--------------- tox.ini | 10 ++++++++-- 6 files changed, 50 insertions(+), 49 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 239f6e4e..5870aa5c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ .coveragerc .coverage.* .venv -*.testrepository .stestr/ openstack_cyborg.egg-info diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..3aeee013 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./ +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6d83b3c4..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 -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/requirements.txt b/requirements.txt index 65ed2447..b03fdfd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,26 +2,26 @@ # 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 -pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2 # BSD -WSME # MIT -six # MIT -eventlet!=0.18.3,!=0.20.1,!=0.21.0 # MIT -oslo.i18n # Apache-2.0 -oslo.config!=4.3.0,!=4.4.0 # Apache-2.0 -oslo.log # Apache-2.0 -oslo.context # Apache-2.0 -oslo.messaging # Apache-2.0 -oslo.concurrency # Apache-2.0 -oslo.service!=1.28.1 # Apache-2.0 -oslo.db # Apache-2.0 -oslo.utils # Apache-2.0 -oslo.versionedobjects # Apache-2.0 -oslo.policy # Apache-2.0 -SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8 # MIT -alembic # MIT -stevedore # Apache-2.0 -keystonemiddleware # Apache-2.0 -jsonpatch!=1.20 # BSD -psutil # BSD -mock # BSD +pbr>=0.11,!=2.1.0 # Apache-2.0 +pecan>=1.0.0,!=1.0.2,!=1.0.3,!=1.0.4,!=1.2 # BSD +WSME>=0.8.0 # MIT +six>=1.8.0 # MIT +eventlet>=0.12.0,!=0.18.3,!=0.20.1,!=0.21.0 # MIT +oslo.i18n>=1.5.0 # Apache-2.0 +oslo.config>=1.1.0,!=4.3.0,!=4.4.0 # Apache-2.0 +oslo.log>=1.14.0 # Apache-2.0 +oslo.context>=2.9.0 # Apache-2.0 +oslo.messaging>=5.29.0 # Apache-2.0 +oslo.concurrency>=3.26.0 # Apache-2.0 +oslo.service>=1.0.0,!=1.28.1 # Apache-2.0 +oslo.db>=4.1.0 # Apache-2.0 +oslo.utils>=3.33.0 # Apache-2.0 +oslo.versionedobjects>=1.31.2 # Apache-2.0 +oslo.policy>=0.5.0 # Apache-2.0 +SQLAlchemy>=0.9.0,!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8 # MIT +alembic>=0.8.10 # MIT +stevedore>=1.5.0 # Apache-2.0 +keystonemiddleware>=4.17.0 # Apache-2.0 +jsonpatch>=1.16,!=1.20 # BSD +psutil>=3.2.2 # BSD +mock>=2.0.0 # BSD diff --git a/test-requirements.txt b/test-requirements.txt index 7b7fbc2f..fb14fb35 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,20 +4,20 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 -coverage!=4.4 # Apache-2.0 -fixtures # Apache-2.0/BSD -mock # BSD -sphinx!=1.6.6,!=1.6.7 # BSD -ddt # MIT -oslosphinx # Apache-2.0 -oslotest # Apache-2.0 -testrepository # Apache-2.0/BSD -testresources # Apache-2.0/BSD -testscenarios # Apache-2.0/BSD -testtools # MIT -sphinxcontrib-pecanwsme # Apache-2.0 -sphinxcontrib-seqdiag # BSD -reno # Apache-2.0 -os-api-ref # Apache-2.0 -tempest # Apache-2.0 +coverage>=3.6,!=4.4 # Apache-2.0 +fixtures>=3.0.0 # Apache-2.0/BSD +mock>=2.0.0 # BSD +sphinx>=1.6.2,!=1.6.6,!=1.6.7 # BSD +ddt>=1.0.1 # MIT +oslosphinx>=4.7.0 # Apache-2.0 +oslotest>=3.2.0 # Apache-2.0 +stestr>=2.0.0 # Apache-2.0/BSD +testresources>=2.0.0 # Apache-2.0/BSD +testscenarios>=0.4 # Apache-2.0/BSD +testtools>=0.9.32 # MIT +sphinxcontrib-pecanwsme>=0.2 # Apache-2.0 +sphinxcontrib-seqdiag>=0.8.4 # BSD +reno>=1.8.0 # Apache-2.0 +os-api-ref>=1.4.0 # Apache-2.0 +tempest>=17.1.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index be47d47a..edd61093 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ setenv = OS_TEST_PATH=cyborg/tests/unit deps = -r{toxinidir}/test-requirements.txt commands = rm -f .testrepository/times.dbm - python setup.py test --slowest --testr-args='{posargs}' + stestr run --slowest {posargs} [testenv:common-constraints] basepython = python3 @@ -48,7 +48,13 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + PYTHON=coverage run --source $project --parallel-mode +commands = + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [doc8] ignore-path = .venv,.git,.tox,*cyborg/locale*,*lib/python*,*cyborg.egg*,api-ref/build,doc/build,doc/source/contributor/api