]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests/bulktest-report.py
Merge pull request #8380 from rgacogne/ddist-default-openssl
[thirdparty/pdns.git] / regression-tests / bulktest-report.py
1 #!/usr/bin/env python
2 from __future__ import print_function
3 import json, sys
4
5 runs = json.load(sys.stdin)
6
7 selectors = dict(s.split('=',1) for s in sys.argv[1:])
8
9 selected=list()
10
11 names=set()
12
13 for run in runs:
14 match = True
15 for k,v in selectors.iteritems():
16 # print k, v, run[k]
17 if run[k] != v:
18 match = False
19 break
20
21 if match:
22 selected.append((run['tag'], run))
23 names.update(run)
24
25 selected.sort()
26
27 names.discard('tag')
28
29 fmt=''.join('%%%ds' % max(15, i+4) for i in [3]+map(len, sorted(names)))
30 print(fmt % tuple(['tag']+sorted(names)))
31 for tag, stats in selected:
32 print(fmt % tuple([tag] + [stats.get(s) for s in sorted(names)]))