diff --git a/.gitignore b/.gitignore index bbdd751b4..3d9f18821 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ develop-eggs/ AUTHORS ChangeLog .testrepository +.stestr .coverage cover etc/vitrage/vitrage.conf diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..cc964e48d --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${TEST_PATH:-./vitrage/tests} +top_dir=./ \ No newline at end of file diff --git a/devstack/post_test_hook.sh b/devstack/post_test_hook.sh index f80f641ec..13c168a0f 100644 --- a/devstack/post_test_hook.sh +++ b/devstack/post_test_hook.sh @@ -31,9 +31,9 @@ fi sudo cp -rf $DEVSTACK_PATH/tempest/etc/logging.conf.sample $DEVSTACK_PATH/tempest/etc/logging.conf cd $DEVSTACK_PATH/tempest/ -sudo -E testr init +sudo -E stestr init echo "Listing existing Tempest tests" -sudo -E testr list-tests vitrage_tempest_tests | grep -E "$TESTS" | tee /tmp/vitrage_tempest_tests.list +sudo -E stestr list vitrage_tempest_plugin | grep -E "$TESTS" | tee /tmp/vitrage_tempest_tests.list echo "Testing $1: $TESTS..." -sudo -E testr run --subunit --load-list=/tmp/vitrage_tempest_tests.list | subunit-trace --fails +sudo -E stestr run --serial --subunit --load-list=/tmp/vitrage_tempest_tests.list | subunit-trace --fails diff --git a/test-requirements.txt b/test-requirements.txt index 910e21fe2..46f038baf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -28,6 +28,7 @@ requests-mock>=1.1.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT +stestr>=1.0.0 # Apache-2.0 stevedore>=1.20.0 # Apache-2.0 voluptuous>=0.8.9 # BSD License sympy>=0.7.6 # BSD diff --git a/tox.ini b/tox.ini index bc408d0bf..ac2db6f10 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,8 @@ setenv = DISCOVER_DIRECTORY=vitrage/tests deps = -r{toxinidir}/test-requirements.txt commands = - /bin/rm -f .testrepository/times.dbm - python setup.py testr --slowest --testr-args='--concurrency 1 {posargs}' + stestr run --serial '{posargs}' + stestr slowest oslo-config-generator --config-file=etc/vitrage/vitrage-config-generator.conf passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY