Use OS_TEST_PATH evironment variable to define tests location

Change-Id: Ia8b4d6e48804c99167429e3535fa4adfc9e880f4
This commit is contained in:
Jakub Libosvar
2025-03-18 16:22:03 -04:00
parent acbf2b2351
commit 06f00c8be9
2 changed files with 5 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
[DEFAULT]
test_path=./ovn_bgp_agent/tests
test_path=${OS_TEST_PATH:-./ovn_bgp_agent/tests/unit}
top_dir=./

View File

@@ -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