diff --git a/.stestr.conf b/.stestr.conf index 4e9b06ec..d1c14424 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,3 @@ [DEFAULT] -test_path=./ovn_bgp_agent/tests +test_path=${OS_TEST_PATH:-./ovn_bgp_agent/tests/unit} top_dir=./ diff --git a/tox.ini b/tox.ini index 0a521fc6..19116517 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ setenv = OS_TEST_TIMEOUT=60 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -commands = stestr run --exclude-regex ".tests.functional" {posargs} +commands = stestr run {posargs} [testenv:pep8] commands = flake8 {posargs} @@ -30,9 +30,10 @@ setenv = {[testenv]setenv} OVS_SRCDIR={envdir}/src/ovn/ovs VTEP_SRCDIR={envdir}/src/ovn/ovs/vtep OVN_BRANCH={env:OVN_BRANCH:} + OS_TEST_PATH=./ovn_bgp_agent/tests/functional commands = bash {toxinidir}/tools/setup-ovs.sh - stestr run --exclude-regex ".tests.unit" {posargs} + {[testenv]commands} allowlist_externals = bash [testenv:cover] @@ -40,7 +41,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHON=coverage run --source ovn_bgp_agent --parallel-mode commands = - stestr run --exclude-regex ".tests.functional" {posargs} + {[testenv]commands} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml