diff --git a/doc/source/contributor/running_tests.rst b/doc/source/contributor/running_tests.rst index ee8e131dd..3523ccdbb 100644 --- a/doc/source/contributor/running_tests.rst +++ b/doc/source/contributor/running_tests.rst @@ -73,28 +73,28 @@ directory use: .. code-block:: console - $ tox -e py27 zaqar.tests.unit.storage + $ tox -e py27 -- zaqar.tests.unit.storage To run the tests specific to the MongoDB driver in the ``zaqar/tests/unit/storage/test_impl_mongodb.py`` file: .. code-block:: console - $ tox -e py27 test_impl_mongodb + $ tox -e py27 -- test_impl_mongodb To run the tests in the ``MongodbMessageTests`` class in the ``tests/unit/storage/test_impl_mongodb.py`` file: .. code-block:: console - $ tox -e py27 test_impl_mongodb.MongodbMessageTests + $ tox -e py27 -- test_impl_mongodb.MongodbMessageTests To run the ``MongodbMessageTests.test_message_lifecycle`` test method in the ``tests/unit/storage/test_impl_mongodb.py`` file: .. code-block:: console - $ tox -e py27 test_impl_mongodb.MongodbMessageTests.test_message_lifecycle + $ tox -e py27 -- test_impl_mongodb.MongodbMessageTests.test_message_lifecycle Running functional tests ------------------------ @@ -131,7 +131,7 @@ To run functional tests in non-integration mode, execute: .. code-block:: console - $ tox -e py27 zaqar.tests.functional + $ tox -e py27 -- zaqar.tests.functional Using a custom MongoDB instance ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lower-constraints.txt b/lower-constraints.txt index ae2f2394a..413eac4ba 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -60,7 +60,7 @@ sphinx===1.6.2 sphinxcontrib-websupport==1.0.1 SQLAlchemy==1.0.10 sqlalchemy-migrate==0.11.0 -stestr==1.0.0 +stestr==2.0.0 stevedore==1.20.0 testrepository==0.0.18 testresources==2.0.0 diff --git a/test-requirements.txt b/test-requirements.txt index ed90ce82e..1c0f32568 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -22,12 +22,11 @@ Pygments>=2.2.0 # BSD license fixtures>=3.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT oslo.db>=4.27.0 # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD -os-testr>=1.0.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 +stestr>=2.0.0 #OSprofiler osprofiler>=1.4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index fde561fd3..27a95ffe9 100644 --- a/tox.ini +++ b/tox.ini @@ -13,13 +13,12 @@ setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 - OS_TEST_PATH=./zaqar/tests/unit deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete - ostestr --concurrency 1 {posargs} + stestr run --serial --slowest {posargs} whitelist_externals = find [testenv:integration] @@ -27,7 +26,7 @@ basepython = python3 setenv = {[testenv]setenv} ZAQAR_TEST_INTEGRATION=1 OS_TEST_PATH=./zaqar/tests/functional -commands = ostestr --concurrency 1 {posargs} +commands = stestr run --serial --slowest {posargs} [testenv:pep8] basepython = python3 @@ -51,7 +50,7 @@ setenv = {[testenv]setenv} PYTHON=coverage run --source zaqar --parallel-mode commands = - stestr run {posargs} + {[testenv]commands} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml