tox parallelized subprocesses should remove TOX_PARALLEL_ENV from passenv #1275
Labels
bug:normal
affects many people or has quite an impact
help:wanted
Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
I don't know if this is worth tackling, as this is an edge case that should only realistically affect plugin authors. In short, the
TOX_PARALLEL_ENV
is always added to the passenv, which is then propagated to the downstream tox/python subprocesses. Normally, this shouldn't matter, since most tox users won't care about the env var. However, this affects test cases that in turn invoke tox itself (i.e., integration tests for plugins like tox-factor and tox-travis). I think this issue should also mean that you can't run tox's test suite in parallel.As an example, take a potential integration test. It would setup a fake project with a tox config, then run some tox test command. The process tree would look something like:
However, if we run this test suite in parallel, the internal tox invocation will already have
TOX_PARALLEL_ENV
set, which is propagated to the various subprocesses, affecting the internal tox test. e.g., it looks something like this:Instead of running normally, the nested tox test command thinks it's running as a parallelized subprocess. I think this can be fixed by having the parallelized tox subprocess remove the
TOX_PARALLEL_ENV
from either its environment variables, or from its subprocess's environment variables.My current workaround is to modify the subprocess environ in my own code. e.g., my plugin tests invoke tox like so:
The text was updated successfully, but these errors were encountered: