]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/printlogs.py
Merge pull request #7026 from jsoref/configure-enable-with
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / printlogs.py
1 #!/usr/bin/env python2
2
3 from __future__ import print_function
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):
19 print("==============> %s <==============" % recursorlog)
20 with open(recursorlog) as f:
21 print(''.join(f.readlines()))
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):
26 print("==============> %s <==============" % authlog)
27 with open(authlog) as f:
28 print(''.join(f.readlines()))