]>
Commit | Line | Data |
---|---|---|
a002923f PL |
1 | #!/usr/bin/env python2 |
2 | ||
7a0ea291 | 3 | from __future__ import print_function |
a002923f PL |
4 | import xml.etree.ElementTree |
5 | import os.path | |
6 | import glob | |
7 | ||
8 | e = xml.etree.ElementTree.parse('nosetests.xml') | |
9 | root = e.getroot() | |
10 | ||
11 | for child in root: | |
12 | if len(child): | |
13 | for elem in child: | |
14 | if elem.tag in ["failure", "error"]: | |
15 | confdirname = child.get("classname").split('_')[1].split('.')[0] | |
16 | confdir = os.path.join("configs", confdirname) | |
17 | recursorlog = os.path.join(confdir, "recursor.log") | |
18 | if os.path.exists(recursorlog): | |
7a0ea291 | 19 | print("==============> %s <==============" % recursorlog) |
a002923f | 20 | with open(recursorlog) as f: |
7a0ea291 | 21 | print(''.join(f.readlines())) |
a002923f PL |
22 | authdirs = glob.glob(os.path.join(confdir, "auth-*")) |
23 | for authdir in authdirs: | |
24 | authlog = os.path.join(authdir, "pdns.log") | |
25 | if os.path.exists(recursorlog): | |
7a0ea291 | 26 | print("==============> %s <==============" % authlog) |
a002923f | 27 | with open(authlog) as f: |
7a0ea291 | 28 | print(''.join(f.readlines())) |