Dne 10.6.2016 v 11:20 Amador Pahim napsal(a):
I don't think the config file would be necessary, but apart from that I agree with this. Maybe in the future we might need `--env-unset` as some ugly software checks for value presence even when the value is null.HiAfter some discussion about the V1, this is the V2 of the RFC on Environment Variables. The original request is here: https://trello.com/c/Ddcly0oG/312-mechanism-to-provide-environment-variables-to-tests-run-on-a-virtual-machine-remote Motivation ========== When Avocado is executed locally, it has access to the local environment variables, including that ones set by the user. For remote executions, like using remote or vm plugins, the local environment variables are not reflected on the remote environment. The motivation of this RFC is to provide the standard Unix interface of environment variables for when tests are run remotely. Use case ======== - User defines an environment variable locally: $ export FOOVAR=myfoovar - User runs avocado using a remote plugin, pointing the local environment variable(s) he wants to keep the in the remote environment: $ avocado --env-keep FOOVAR run passtest.py --remote-hostname host01 - The environment variable defined locally will be present on host01 environment. Alternative flow: - Instead of pointing in the command line the local environment variable(s) he wants to keep the in the remote environment, uses can set it in avocado.conf so it will affect every Avocado execution. Proposal ======== - To create an Avocado command line option to set environment variables that will be available in remote environment: $ avocado --env-keep FOOVAR run passtest.py --remote-hostname host01 - Create an option in config file with a list of environment variable names to copy from Avocado local environment to the remote environment (similar to env_keep in the /etc/sudoers file): [remoter.behavior] env_keep = ['FOO', 'FOO1', 'FOO2']
Lukáš
Best Regards,
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Avocado-devel mailing list Avocado-devel@redhat.com https://www.redhat.com/mailman/listinfo/avocado-devel