From 3d37a3ea661bc55d85a0bc5a37f66b6f71889c0d Mon Sep 17 00:00:00 2001 From: Eyal Date: Thu, 22 Feb 2018 11:29:41 +0200 Subject: [PATCH] move to stestr testr is not maintained any more Depends-On: I574414aba16377cc550111b9bcd627c28f04fc49 Change-Id: Ibea81c6583300074cfed3c1fa7fb98e2d1dc90fc --- .gitignore | 1 + .stestr.conf | 3 +++ devstack/post_test_hook.sh | 6 +++--- test-requirements.txt | 1 + tox.ini | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .stestr.conf 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