@@ -43,23 +43,18 @@ def get_symex_pathname():
43
43
return os .path .abspath (os .path .join (_tools_binary_dir , "symex" ))
44
44
45
45
46
- def run_security_analyser (
47
- config_json_file ,
48
- verbosity ,
49
- results_dir ,
50
- use_goto_binary
51
- ):
46
+ def run_security_analyser (config_json_file , cmdline ):
52
47
prof = {}
53
48
prof_start_time = time .time ()
54
49
55
- if not os .path .exists (results_dir ):
56
- os .makedirs (results_dir )
50
+ if not os .path .exists (cmdline . results_dir ):
51
+ os .makedirs (cmdline . results_dir )
57
52
58
53
old_cwd = os .getcwd ()
59
- os .chdir (results_dir )
54
+ os .chdir (cmdline . results_dir )
60
55
61
- if use_goto_binary :
62
- program_json_file = os .path .abspath (os .path .join (results_dir , "program.json" ))
56
+ if cmdline . use_goto_binary :
57
+ program_json_file = os .path .abspath (os .path .join (cmdline . results_dir , "program.json" ))
63
58
with open (program_json_file , "r" ) as ifile :
64
59
program_info = json .load (ifile )
65
60
assert "gbf" in program_info
@@ -72,8 +67,8 @@ def run_security_analyser(
72
67
prof ["calling_security_analyser_for_goto_program_generation" ] = {}
73
68
prof_calling_security_analyser_start_time = time .time ()
74
69
print ("Invoking 'security-analyser' to translate Java to GOTO program." )
75
- if verbosity >= 9 :
76
- print ("CWD: " + results_dir )
70
+ if cmdline . verbosity >= 9 :
71
+ print ("CWD: " + cmdline . results_dir )
77
72
print ("CMD: " + command )
78
73
os .system (command )
79
74
prof ["calling_security_analyser_for_goto_program_generation" ]["duration" ] = time .time () - prof_calling_security_analyser_start_time
@@ -85,8 +80,8 @@ def run_security_analyser(
85
80
prof ["calling_security_analyser" ] = {}
86
81
prof_calling_security_analyser_start_time = time .time ()
87
82
print ("Invoking 'security-analyser' ..." )
88
- if verbosity >= 9 :
89
- print ("CWD: " + results_dir )
83
+ if cmdline . verbosity >= 9 :
84
+ print ("CWD: " + cmdline . results_dir )
90
85
print ("CMD: " + command )
91
86
os .system (command )
92
87
prof ["calling_security_analyser" ]["duration" ] = time .time () - prof_calling_security_analyser_start_time
0 commit comments