Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMT environment variables can't be used in plan environment variable subustitution #2057

Open
BeeGrech opened this issue May 5, 2023 · 1 comment

Comments

@BeeGrech
Copy link
Contributor

BeeGrech commented May 5, 2023

Variables listed https://tmt.readthedocs.io/en/stable/overview.html#variables are not passed in a substituted form, they are only literately substituted when the test is executed

For example in my plan:

environment:
    INTERNAL_INCLUDE_PATH: $TMT_TREE/storage/include/bash_modules/lxt

in my test file I intended to use this for an import statement for directory structure.
runtest.sh:

INCLUDE_PATH=${INTERNAL_INCLUDE_PATH:-/some/dir/modules/lxt}

where the result is

line 16: $TMT_TREE/storage/include/bash_modules/lxt/utils.sh: No such file or directory

but it would be nice to be able to pass this through the plan variable also. Because if I were to have declared a line in the test with the $TMT_TREE var this works

@happz
Copy link
Collaborator

happz commented May 22, 2023

That is indeed the current behavior. I'm not saying it's the desired behavior or the right or wrong behavior, just the current one, you're not missing any secret handshake. Values are treated as literals, and exported into the plan and test environment as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants