avocado-framework/avocado

Extended environment variable control

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
Avocado's ``exec-test` test type turns its runnable's "kwarg" fields into environment variables. But, while that allows for some control of the executable's (that will be considered the test) environment, it fails to allow for instance to clear the environment variable.

There's also no way to clear all environment variables.

Describe the solution you'd like
There should be a way to determine that a exec-test's kwarg is actually a request to clear an environment variable. Also, there should be a global way of clearing all environment variables but the ones that are set.

Describe alternatives you've considered
Instead of doing this at the runnable's kwarg level, this could be handled at the spawner level, so that it'd be applicable to all test types. This seems to be more complex and the added value is not clear.

Sounds like a good description of the problem to me. Fwiw, for our (passt's) purposes this is a nice-to-have, but in no way a blocker for starting implementing stuff.