Environment variable in test script command line
On our design, we use test script with command line option.
The command line is supposed to have an environment variable inside it.
For example: %LOCATION%\script.sh.
Meaning, the location of the script depends on the value of the environment variable.
I couldn't find a way to execute this command line with environment variable. Tried %VAR%, $VAR and etc.
Is there a way to do that?
Comments
Donald Nong
Feb 12 '17, 9:17 p.m.I'm a bit confused with what you want to achieve. If you want to execute %LOCATION%\script.sh, shouldn't you just pass a value (path) to the environment variable LOCATION? Also, how do you execute your test script?
Miriam Kilav
Feb 13 '17, 3:56 a.m.The value of LOCATION can be changed, actually it is different between our machines. So I can't know in advanced what will be the value.
We will trigger the test suite via an automatically tool (Jenkins) but I think it doesn't matter.
Donald Nong
Feb 13 '17, 8:02 p.m.I'm confused. You'd better explain your use case in more details. For example, from which machine do you trigger the test script? On which machine does your test script run? What environment variables does your test script receive (you can simply dump all the variables and check)?
Miriam Kilav
Feb 15 '17, 12:52 p.m.OK. I will try.