]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
tox: pass TEMPEST_CONFIG_DIR envvar into api target environment
authorIhar Hrachyshka <ihrachys@redhat.com>
Tue, 24 Nov 2015 14:13:00 +0000 (15:13 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Tue, 24 Nov 2015 14:19:07 +0000 (15:19 +0100)
Currently, API job skips all tests because TEMPEST_CONFIG_DIR is not set
properly. The environment variable was hardcoded to
/opt/stack/tempest/etc before, and since that's the location for tempest
configuration files that was used in gate, it worked fine there.

But after we were forced to remove the hardcoded value from the file due
to regression in tox 2.2.0+ (If3742b6eabe295a5aaeb4901c55909a70c451698),
it was neither hardcoded, nor passed from the external gate environment.

Note that since tox 2.0.0, the tool does not pass all envvars into tox
targets, but require explicit specification of the list of variables
that should be allowed into the target environment, using passenv
directive.

So that's what the patch does: it allows TEMPEST_CONFIG_DIR to get into
api tox target, which should be enough to make the API job avoid
skipping all tests.

Users are still required to set TEMPEST_CONFIG_DIR variable locally if
they want to execute the suite locally.

Closes-Bug: #1518632
Change-Id: Ia7dcc6785390a6012c7ba16a14573aa44f2b6fb5

tox.ini

diff --git a/tox.ini b/tox.ini
index 23b70288a7b777df6d7f96d6934240087a387d66..acec80aaecfe09144f5c662df7780d42dbe31a68 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -21,6 +21,7 @@ commands =
 
 [testenv:api]
 basepython = python2.7
+passenv = {[testenv]passenv} TEMPEST_CONFIG_DIR
 setenv = {[testenv]setenv}
          OS_TEST_PATH=./neutron/tests/api
          OS_TEST_API_WITH_REST=1