Skip to content

Commit 51103c8

Browse files
committed
Make check-summary.py support file globbing
Fixes the following error when executing `make check-lite`: Traceback (most recent call last): File "/home/bnoordhuis/src/rust/src/etc/check-summary.py", line 27, in <module> map(summarise, logfiles) File "/home/bnoordhuis/src/rust/src/etc/check-summary.py", line 10, in summarise with open(fname) as fd: IOError: [Errno 2] No such file or directory: 'tmp/*.log'
1 parent 8cce35e commit 51103c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/etc/check-summary.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# xfail-license
33

4+
import glob
45
import sys
56

67
if __name__ == '__main__':
@@ -24,7 +25,8 @@ def summarise(fname):
2425
def count(t):
2526
return sum(map(lambda (f, s): len(s.get(t, [])), summaries))
2627
logfiles = sys.argv[1:]
27-
map(summarise, logfiles)
28+
for files in map(glob.glob, logfiles):
29+
map(summarise, files)
2830
ok = count('ok')
2931
failed = count('failed')
3032
ignored = count('ignored')

0 commit comments

Comments
 (0)