muteria.drivers.testgeneration.testcase_formats.ktest.ktest module

class muteria.drivers.testgeneration.testcase_formats.ktest.ktest.KTestTestFormat[source]

Bases: object

STDIN_KTEST_DATA_FILE = 'muteria-stdin-ktest-data'
clean_everything_regex_new = re.compile('^KLEE-REPLAY: ')
clean_everything_regex_old = re.compile('(klee-replay: received signal [0-9]+\\s+. Killing monitored process\\(es\\)$|^note: (pty|pipe) (master|slave): |klee-replay: PTY (MASTER|SLAVE): EXIT STATUS: |^warning: check_file .*: .* mismatch: [0)
clean_part_regex_new = re.compile('(^KLEE-REPLAY: NOTE: |^KLEE-REPLAY: WARNING: |^KLEE-REPLAY: klee_warning: |^KLEE-REPLAY: klee_warning_once: |^KLEE-REPLAY: klee_assume)')
clean_part_regex_old = re.compile('(klee-replay: received signal [0-9]+\\s+. Killing monitored process\\(es\\)$|^note: (pty|pipe) (master|slave): |klee-replay: PTY (MASTER|SLAVE): EXIT STATUS: |^warning: check_file .*: .* mismatch: [0)
static cross_folder_fdupes(custom_bin, folders, folder2alias)[source]
static cross_tool_fdupes(*testtools)[source]
classmethod execute_test(executable_file, test_file, env_vars, stdin=None, must_exist_dir_list=None, timeout=None, collected_output=None, custom_replay_tool_binary_dir=None)[source]
static get_dir(ktest_fullpath, cand_folders)[source]
classmethod get_replay_test_wrapper_str(exe_env_var, ktest_env_var, timeout_env_var, custom_replay_tool_binary_dir=None)[source]
classmethod get_test_replay_tool(custom_replay_tool_binary_dir=None)[source]
classmethod installed(custom_binary_dir=None)[source]

Check that the tool is installed :return: bool reprenting whether the tool is installed or not

(executable accessible on the path) - True: the tool is installed and works - False: the tool is not installed or do not work

ktest_extension = '.ktest'
classmethod ktest_fdupes(*args, custom_replay_tool_binary_dir=None)[source]

This function computes the fdupes of the klee ktest directories and ktest files given as arguments. It requires that the files and directories passed as arguments exist

Parameters:

*args

each argument is either a file or a directory that exists

Returns:

returns two values: - The first is a python list of tuples.

each tuple represents files that are duplicate with each other and ranked by their age (modified time) the oldest first (earliest modified to latest modified).

  • The second is the list of files that are not valid

    ktest files.

status_regex_new = re.compile('^(KLEE-REPLAY: NOTE:\\s+)(EXIT STATUS: .*?)(\\s+\\([0-9]+\\s+seconds\\))$')
status_regex_old = re.compile('^(klee-replay:\\s+)?(EXIT STATUS: .*?)(\\s+\\([0-9]+\\s+seconds\\))?$')
stdbuf = 'stdbuf'
timedout_retcodes = (88,)
tool = 'klee-replay'