From aedc84f95415cdeb384da85c1fd271564832870d Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Fri, 31 Jan 2020 13:32:03 +0000 Subject: [klee-stats] Check if stats file exist before trying to open it Providing a list of directories might sometimes not contain the stats file. Check its existence before trying to access it. --- tools/klee-stats/klee-stats | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/klee-stats/klee-stats b/tools/klee-stats/klee-stats index 1a32432d..5bc00e04 100755 --- a/tools/klee-stats/klee-stats +++ b/tools/klee-stats/klee-stats @@ -305,8 +305,12 @@ def main(): if len(dirs) == 0: print('no klee output dir found', file=sys.stderr) exit(1) + + # Filter non-existing files, useful for star operations + valid_log_files = [getLogFile(f) for f in dirs if os.path.isfile(getLogFile(f))] + # read contents from every run.stats file into LazyEvalList - data = [LazyEvalList(getLogFile(d)) for d in dirs] + data = [LazyEvalList(d) for d in valid_log_files] if args.toCsv: import csv -- cgit 1.4.1