pcvs.testing.testfile module

class pcvs.testing.testfile.TestFile(file_in, path_out, data=None, label=None, prefix=None)[source]

Bases: object

A TestFile manipulates source files to be processed as benchmarks (pcvs.yml & pcvs.setup).

It handles global informations about source imports & building one execution script (list_of_tests.sh) per input file.

param _in:

YAML input file

type _in:

str

param _path_out:

prefix where to store output artifacts

type _path_out:

str

param _raw:

stream to populate the TestFile rather than opening input file

type _raw:

dict

param _label:

label the test file comes from

type _label:

str

param _prefix:

subtree the test file has been extracted

type _prefix:

str

param _tests:

list of tests handled by this file

type _tests:

list

param _debug:

debug instructions (concatenation of TE debug infos)

type _debug:

dict

cc_pm_string = ''
flush_sh_file()[source]

Store the given input file into their destination.

generate_debug_info()[source]

Dump debug info to the appropriate file for the input object.

load_from_file(f)[source]
load_from_str(data)[source]

Fill a File object from stream.

This allows reusability (by loading only once).

Parameters:

data (YAMl-formatted str) – the YAML-formatted input stream.

property nb_descs
process()[source]

Load the YAML file and map YAML nodes to Test().

rt_pm_string = ''
save_yaml()[source]
val_scheme = None
validate(allow_conversion=True)[source]
Return type:

bool

pcvs.testing.testfile.init_constant_tokens()[source]

Initialize global tokens to be replaced.

The dict is built from profile specifications. The exact location for this function is still to be determined.

pcvs.testing.testfile.replace_special_token(content, src, build, prefix, list=False)[source]