]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests.recursor-dnssec/printlogs.py
Merge pull request #7728 from neilcook/nod_docs
[thirdparty/pdns.git] / regression-tests.recursor-dnssec / printlogs.py
CommitLineData
a002923f
PL
1#!/usr/bin/env python2
2
7a0ea291 3from __future__ import print_function
a002923f
PL
4import xml.etree.ElementTree
5import os.path
6import glob
7
8e = xml.etree.ElementTree.parse('nosetests.xml')
9root = e.getroot()
10
11for 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()))