Skip to content

Commit 8143e01

Browse files
authored
Skip JSON files which do not appear to be lcov performance data - e.g., LLVM profiles.
(#420) Signed-off-by: Henry Cox <[email protected]>
1 parent 7b33ea2 commit 8143e01

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/spreadsheet.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,16 @@ def insertStats(keys, sawData, sumRow, avgRow, devRow, beginRow, endRow, col):
175175
continue
176176

177177
try:
178-
tool = data['config']['tool']
178+
cfg = data['config']
179+
180+
try:
181+
tool = data['config']['tool']
182+
except:
183+
tool = 'unknown'
184+
print("%s: unknown tool" %(name))
179185
except:
180-
tool = 'unknown'
181-
print("%s: unknown tool" %(name))
186+
print("%s: no 'config' data key - I think this is not lcov performance data - skipping" % (name))
187+
continue
182188

183189
p, f = os.path.split(name)
184190
if os.path.splitext(f)[0] == tool:

0 commit comments

Comments
 (0)