Inherit environment variables for tests that use nodeenv
Tox 2.0 stopped automatically passing environment variables into the
virtual environment which potentially breaks test jobs which use nodeenv
because of the nature of running nodeenv within a virtual environment.
The nodeenv documentation (https://pypi.python.org/pypi/nodeenv) even
says:
"
If you already have the python virtualenv tool, and want to use nodeenv
and virtualenv in conjunction, then you should create (or activate) the
python virtual environment:
$ mkvirtualenv my_env
$ . my_env/bin/activate
and add a node virtual environment to this existing new_venv:
$ nodeenv -p
"
Since we can't source {envdir}/bin/activate from within the tox.ini, we
just pass the environment variables into the virtual environment using
passenv = *.
An alternative may be to change run_test.sh to run tests which use
nodeenv within a venv by sourcing $VIRTUAL_ENV/bin/activate from within
run_test.sh.
Conflicts:
tox.ini
NOTE(mriedem): The conflict is on the jscs job which was not in kilo.
Closes-Bug: #1458928
Change-Id: Icb91cdc0d4610407c4eeeda82f194c7016e3b540
(cherry picked from commit 22c485b179
)
This commit is contained in:
parent
bb0523722f
commit
322a74c13c
Loading…
Reference in New Issue