Skip to content

Inserting directives from another file

Richard R. Drake edited this page Jun 8, 2022 · 1 revision

In a header directive section, the directives from a second file can be inserted into the current file. For example, consider a file called incl.txt with contents

#VVT: link : somefile.txt
#VVT: copy : otherfile.dat

Then the directives in this file:

#VVT: parameterize : np=1 4
#VVT: include : incl.txt

would be processed as a file with these header contents

#VVT: parameterize : np=1 4
#VVT: link : somefile.txt
#VVT: copy : otherfile.dat

Relative file path names are relative to the file using the include specification.

The include keyword has an alias - the keyword insert directive file can also be used.

The file includes can be controlled using certain attributes: testname, platform, and option. For example,

#VVT: include (testname=foo) : somefile.txt
#VVT: include (platform="not Linux") : otherfile.txt
#VVT: include (option="dbg") : dbgfile.txt

And more than one attribute can be specified in the same directive (separate with commas).

Clone this wiki locally