Commit Graph
2 Commits
Author SHA1 Message Date
John Chilton 7879327c34 Add more interesting expression to environment_variables demo tool.
Per suggestion by @nsoranzo (https://github.com/galaxyproject/galaxy/pull/395#issuecomment-114827531).
2015-06-24 08:55:44 -04:00
John Chilton 3784fece91 Allow environment variable definitions in tool XML.
An ``<environment_variables>`` top-level XML block can be used to define these.

```
<environment_variables>
    <environment_variable name="FOO">$bar</environment_variable>
    <environment_variable name="FOO2">$bar2</environment_variable
</environment_variables>
```

The expressions are contained in the text of the block.

Implementation Detials:

In order to avoid odd shell expression stuff - the evaluated expressions are written to files and environment variables are read from these files at runtime.

Testing:

A demo tool ``test/functional/tools/environment_variables.xml`` with a test case that can be executed with the following expression.

```
./run_tests.sh -framework -id environment_variables
```
2015-06-23 20:27:07 -04:00