Skip to content

Commit 259cfe6

Browse files
committed
fix -v mode (run_cmd() calls)
1 parent cb25325 commit 259cfe6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

afl-cov

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def process_afl_test_cases(cargs):
159159
" --directory " + cargs.code_dir +
160160
" --output-file " +
161161
def_dir + '/lcov/tracefile.lcov_base',
162-
cov_paths, cargs, LOG_ERRORS)
162+
cov_paths['log_file'], cargs, LOG_ERRORS)
163163

164164
# run all afl_files
165165
for index, f in enumerate(afl_files):
@@ -188,7 +188,7 @@ def process_afl_test_cases(cargs):
188188
cargs.code_dir +
189189
" --output-file " +
190190
def_dir + '/lcov/tracefile.lcov_info',
191-
cov_paths, cargs, LOG_ERRORS)
191+
cov_paths['log_file'], cargs, LOG_ERRORS)
192192

193193
# merge base and info (and exclude, if needed)
194194
if cargs.disable_lcov_exclude_pattern:
@@ -197,22 +197,22 @@ def process_afl_test_cases(cargs):
197197
" --no-checksum -a " + def_dir + '/lcov/tracefile.lcov_base' +
198198
" -a " + def_dir + '/lcov/tracefile.lcov_info' +
199199
" --output-file " + def_dir + '/lcov/tracefile.lcov_info_final',
200-
cov_paths, cargs, WANT_OUTPUT)[1]
200+
cov_paths['log_file'], cargs, WANT_OUTPUT)[1]
201201
else:
202202
tmp_file = NamedTemporaryFile(delete=False)
203203
run_cmd(cargs.lcov_path +
204204
lcov_opts +
205205
" --no-checksum -a " + def_dir + '/lcov/tracefile.lcov_base' +
206206
" -a " + def_dir + '/lcov/tracefile.lcov_info' +
207207
" --output-file " + tmp_file.name,
208-
cov_paths, cargs, LOG_ERRORS)
208+
cov_paths['log_file'], cargs, LOG_ERRORS)
209209

210210
out_lines = run_cmd(cargs.lcov_path +
211211
lcov_opts +
212212
" --no-checksum -r " + tmp_file.name +
213213
" " + cargs.lcov_exclude_pattern + " --output-file " +
214214
def_dir + '/lcov/tracefile.lcov_info_final',
215-
cov_paths, cargs, WANT_OUTPUT)[1]
215+
cov_paths['log_file'], cargs, WANT_OUTPUT)[1]
216216
if os.path.exists(tmp_file.name):
217217
os.unlink(tmp_file.name)
218218

@@ -229,7 +229,7 @@ def process_afl_test_cases(cargs):
229229
' --output-directory ' +
230230
def_dir + '/web ' +
231231
def_dir + '/lcov/tracefile.lcov_info_final',
232-
cov_paths, cargs, LOG_ERRORS)
232+
cov_paths['log_file'], cargs, LOG_ERRORS)
233233

234234
logr("[+] Final lcov web report: %s" % web_link,
235235
cov_paths['log_file'], cargs)
@@ -276,10 +276,10 @@ def process_afl_test_cases(cargs):
276276
### for the current AFL test case file
277277
if run_once:
278278
run_cmd(cargs.coverage_cmd.replace('AFL_FILE', f),
279-
cov_paths, cargs, NO_OUTPUT)
279+
cov_paths['log_file'], cargs, NO_OUTPUT)
280280
else:
281281
out_lines = run_cmd(cargs.coverage_cmd.replace('AFL_FILE', f),
282-
cov_paths, cargs, WANT_OUTPUT)[1]
282+
cov_paths['log_file'], cargs, WANT_OUTPUT)[1]
283283
run_once = True
284284

285285
### generate the code coverage stats for this test case

0 commit comments

Comments
 (0)