From c886130f1530a9f3374f1b2c255d5070924f3947 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 24 May 2018 11:16:07 -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 it then. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Idd7629f2a051aadaf53b04a1b331b20d7fa690de --- .gitignore | 3 ++- .stestr.conf | 3 +++ .testr.conf | 4 ---- requirements.txt | 2 +- tox.ini | 8 ++++++-- 5 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index b496d6210..cdf703f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ build *.swp *.swo *.pyc -.testrepository .idea/* *~ +!/.stestr.conf +.stestr/ diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..25d6b5187 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./tests/} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 1641f86e3..000000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 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 14787d831..89ed59422 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ # integrated gate. Any sync must happen manually as recommended by # the openstack release team. pbr>=2.0.0,!=2.1.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=1.0.0 # Apache-2.0 testtools>=1.4.0 # MIT diff --git a/tox.ini b/tox.ini index 29bb0081f..b10fe7489 100644 --- a/tox.ini +++ b/tox.ini @@ -5,14 +5,18 @@ skipsdist = True [testenv] usedevelop = True -setenv = VIRTUAL_ENV={envdir} +setenv = + VIRTUAL_ENV={envdir} + OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} + OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} + OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} install_command = pip install -U {opts} {packages} # Unit test requires docutils and it is recommended to install docutils via # sphinx. We use doc/requirements.txt as well to avoid duplicated entries. deps = -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:venv] commands = {posargs}