Revert "Switch to stestr"

Turns out the functional tests with python3.5 started to fail due to
this change.

We will need to investigate it better prior to going ahead with
switching to stestr, unfortunately.

This reverts commit b713ad36fb00fba93cb943e879674c61d6b71491.

Change-Id: I2da1c9fd3294dc4abba95ea31a8f92bdd8f50a8a
This commit is contained in:
Lucas Alvares Gomes 2019-01-30 11:10:14 +00:00
parent b1bbe868e1
commit 4057826304
5 changed files with 21 additions and 7 deletions

8
.testr.conf Normal file

@ -0,0 +1,8 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
OS_LOG_CAPTURE=1 \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_ovn/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -62,6 +62,7 @@ openstackdocstheme==1.18.1
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
os-testr==1.0.0
os-xenapi==0.3.1
osc-lib==1.8.0
oslo.cache==1.26.0

@ -11,7 +11,7 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
pylint==1.9.3;python_version=='2.7' # GPLv2
pylint==2.1.1;python_version>='3.0' # GPLv2
testresources>=2.0.0 # Apache-2.0/BSD

8
tools/ostestr_compat_shim.sh Executable file

@ -0,0 +1,8 @@
#!/bin/sh
# preserve old behavior of using an arg as a regex when '--' is not present
case $@ in
(*--*) ostestr $@;;
('') ostestr;;
(*) ostestr --regex "$@"
esac

@ -8,9 +8,6 @@ usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
PYTHONWARNINGS=default::DeprecationWarning
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -18,7 +15,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/re
whitelist_externals = bash
rm
commands =
stestr run {posargs}
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8]
@ -59,7 +56,7 @@ setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
deps = {[testenv:functional]deps}
commands =
stestr run {posargs}
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:dsvm-functional-py35]
basepython = python3.5
@ -67,7 +64,7 @@ setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
deps = {[testenv:functional]deps}
commands =
stestr run {posargs}
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:cover]
basepython = python3