From d536ed248bf5d8320b88c28fb30deff64071b020 Mon Sep 17 00:00:00 2001 From: Hidekazu Nakamura Date: Thu, 9 Nov 2017 17:31:39 +0900 Subject: [PATCH] Fix test runner config issues with os-testr 1.0.0 The os-testr 1.0.0 release had a couple of required config changes due to it's internal usage of stestr. This commit fixes those by adding a .stestr.conf (to remove a warning) sets the fixture env variables in the tox.ini instead of being hidden in .testr.conf and removing the quotes around posargs to make passing args to ostestr actually work. Also to keep the expected dev experience stestr is used directly for places where ostestr was called directly. Change-Id: I785b0dc1720328b119f0978aa573ad0b89e54c75 Closes-Bug: #1731155 --- .gitignore | 1 + .stestr.conf | 4 ++++ tox.ini | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .stestr.conf diff --git a/.gitignore b/.gitignore index 6c105324d..e3e2ffa97 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ pip-log.txt .coverage* .tox nosetests.xml +.stestr/ .testrepository .venv .idea diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 000000000..0579b69bc --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./watcher/tests} +top_dir=./ + diff --git a/tox.ini b/tox.ini index aa2bedaab..d33533147 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ deps = -r{toxinidir}/test-requirements.txt commands = rm -f .testrepository/times.dbm find . -type f -name "*.py[c|o]" -delete - ostestr --concurrency=6 {posargs} + stestr run {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8]