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
This commit is contained in:
Hidekazu Nakamura 2017-11-09 17:31:39 +09:00
parent 1b4c5dfc8b
commit d536ed248b
3 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -24,6 +24,7 @@ pip-log.txt
.coverage* .coverage*
.tox .tox
nosetests.xml nosetests.xml
.stestr/
.testrepository .testrepository
.venv .venv
.idea .idea

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./watcher/tests}
top_dir=./

View File

@ -14,7 +14,7 @@ deps = -r{toxinidir}/test-requirements.txt
commands = commands =
rm -f .testrepository/times.dbm rm -f .testrepository/times.dbm
find . -type f -name "*.py[c|o]" -delete 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 passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8] [testenv:pep8]