Skip to content

Add a 'templates' directive. #141

Open
@Paul-Ferrell

Description

@Paul-Ferrell

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions