# | |-master - the master file system to be used (folder or tarball)
# | |-templates - default config files etc. that are copied to the guests root
# | | file system. a directory with the guest's name must exist in
-# | | the directory specified here.
+# | | the directory specified here. the contents of a subdirectory
+# | | named 'default' are copied to all guests.
# | |-mem - the memory in MB per guest
# | |-console - a list of consoles to be connected for the guests (xterm|pts).
# | e.g.
@root = File.join(Testing.guests_dir, name, 'diff')
if @templates
- tmpl = File.join(@templates, name)
- if File.directory?(tmpl)
- # '/.' is required to copy the contents of tmpl and not tmpl itself
- FileUtils.cp_r(tmpl + '/.', @root)
+ ['default', name].each do |dir|
+ tmpl = File.join(@templates, dir)
+ if File.directory?(tmpl)
+ # '/.' is required to copy the contents of tmpl and not tmpl itself
+ FileUtils.cp_r(tmpl + '/.', @root)
+ end
end
end