chc.cmdline.kendra.TestManager module
- exception chc.cmdline.kendra.TestManager.FileParseError(msg: str)[source]
Bases:
chc.util.fileutil.CHCError
- class chc.cmdline.kendra.TestManager.TestManager(projectpath: str, targetpath: str, testname: str, saveref: bool = False, verbose: bool = True)[source]
Bases:
objectProvide utility functions to support regression and platform tests.
- Parameters
projectpath – directory that holds the source code
targetpath – directory that holds the chc artifacts directory
testname – name of the test directory
saveref – adds missing ppos to functions in the json spec file and overwrites the json file with the result
- property analysisresultspath: str
- property cchpath: str
- check_ppo_proofs(cfilename: str, cfun: chc.cmdline.kendra.TestCFunctionRef.TestCFunctionRef, funppos: List[CFunctionPO], refppos: List[chc.cmdline.kendra.TestPPORef.TestPPORef]) None[source]
Check if ppo analysis results match the expected results.
- check_ppos(cfilename: str, cfun: str, ppos: List[CFunctionPO], refppos: List[chc.cmdline.kendra.TestPPORef.TestPPORef]) None[source]
Check if all required primary proof obligations are created.
- check_spo_proofs(cfilename: str, cfun: chc.cmdline.kendra.TestCFunctionRef.TestCFunctionRef, funspos: List[CFunctionPO], refspos: List[chc.cmdline.kendra.TestSPORef.TestSPORef]) None[source]
Check if spo analysis results match the expected results.
- check_spos(cfilename: str, cfun: str, spos: List[CFunctionPO], refspos: List[chc.cmdline.kendra.TestSPORef.TestSPORef]) None[source]
Check if spos created match reference spos.
- property config: chc.util.Config.Config
- property contractpath: str
- create_reference_ppos(cfilename: str, fname: str, ppos: List[CFunctionPO]) None[source]
Create reference ppos from actual analysis results.
- create_reference_spos(cfilename: str, fname: str, spos: List[CFunctionPO]) None[source]
Create reference spos from actual analysis results.
- property cref_filenames: List[str]
- property cref_files: List[chc.cmdline.kendra.TestCFileRef.TestCFileRef]
- get_cref_file(cfilename: str) Optional[chc.cmdline.kendra.TestCFileRef.TestCFileRef][source]
- property is_linux_only: bool
- property ismac: bool
- property parsemanager: chc.cmdline.ParseManager.ParseManager
- property projectpath: str
- property savedsourcepath: str
- property saveref: bool
- property targetpath: str
- test_ppo_proofs(delaytest: bool = False) None[source]
Run analysis and check if analysis results match expected results.
Skip checking results if delaytest is true.
- test_spo_proofs(delaytest: bool = False) None[source]
Run analysis and check analysis results against the expected results.
Skip the checking if delaytest is True.
- test_spos(delaytest: bool = False) None[source]
Run analysis and check if all expected spos are created.
- property testname: str
- property testresults: chc.cmdline.kendra.TestResults.TestResults
- property testsetref: chc.cmdline.kendra.TestSetRef.TestSetRef
- property verbose: bool