Open
Description
Templates are like the 'Files' directive (#140), except they refer to a template file that is read, filled in with Pavilion variables, and written out to the specified location.
mytest:
variables:
foo: bar
run:
templates:
'src/Makefile': 'make_template.tmpl'
- The destination file is the key, and the source file is the value to fit better with the syntax for the 'files' directive.
- The destination may be a relative path as per 'files'.
- The entire file should be read as a single PavString, and resolved using the test's variable manager.
- If this in the the build step, deferred variables are not allowed.
- If this is in the run step, resolution will have to happen twice just like with the
run.sh
file.