about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/klee-stats/klee-stats7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/klee-stats/klee-stats b/tools/klee-stats/klee-stats
index 5a855705..49b101b3 100755
--- a/tools/klee-stats/klee-stats
+++ b/tools/klee-stats/klee-stats
@@ -99,16 +99,19 @@ def stripCommonPathPrefix(paths):
     return ['/'.join(p[i:]) for p in paths]
 
 
+def isValidKleeOutDir(dir):
+    return os.path.exists(os.path.join(dir, 'info')) and os.path.exists(os.path.join(dir, 'run.stats'))
+
 def getKleeOutDirs(dirs):
     kleeOutDirs = []
     for dir in dirs:
-        if os.path.exists(os.path.join(dir, 'info')):
+        if isValidKleeOutDir(dir):
             kleeOutDirs.append(dir)
         else:
             for root, subdirs, _ in os.walk(dir):
                 for d in subdirs:
                     path = os.path.join(root, d)
-                    if os.path.exists(os.path.join(path, 'info')):
+                    if isValidKleeOutDir(path):
                         kleeOutDirs.append(path)
     return kleeOutDirs