buildtest.builders.script
Module Contents
Classes
This is a subclass of BuilderBase used for building test that uses |
- class buildtest.builders.script.ScriptBuilder(name, recipe, buildspec, executor, buildexecutor, configuration, testdir=None, numprocs=None, numnodes=None, compiler=None, strict=None, display=None)[source]
Bases:
buildtest.builders.base.BuilderBase
This is a subclass of BuilderBase used for building test that uses
type: script
in the buildspec.The BuilderBase provides common functions for any builder. The builder is an instance of BuilderBase. The initializer method will setup the builder attributes based on input test by
name
parameter.- Parameters:
name (str) – Name of test in buildspec recipe
recipe (str) – The loaded test section from the buildspec file
buildspec (str) – Full path to buildspec file
buildexecutor (
buildtest.executors.setup.BuildExecutor
) – An instance of BuildExecutor class used for accessing executorstestdir (str) – Test directory where tests are written. Must be full path on filesystem.
display (list, optional) – Display content of output/error or test.
- type = 'script'
- write_python_script()[source]
This method is used for writing python script when
shell: python
is set. The content fromrun
section is added into a python script. The file is written to run directory and we simply invoke python script by runningpython script.py