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}