aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/skype/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/skype/test.py')
-rwxr-xr-xprotocols/skype/test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/skype/test.py b/protocols/skype/test.py
index f20039e2..b3f25f46 100755
--- a/protocols/skype/test.py
+++ b/protocols/skype/test.py
@@ -24,6 +24,20 @@ class Test(unittest.TestCase):
stdout=skyped_log, stderr=subprocess.STDOUT)
try:
bitlbee = pexpect.spawn('../../bitlbee', ['-d', 't/bitlbee'], logfile=pexpect_log)
+ if os.environ.get('ATTACH_GDB'):
+ subprocess.Popen(['gdb', '-batch-silent',
+ '-ex', 'set logging overwrite on',
+ '-ex', 'set logging file t/gdb-%s.log' % bitlbee.pid,
+ '-ex', 'set logging on',
+ '-ex', 'handle all pass nostop noprint',
+ '-ex', 'handle SIGSEGV pass stop print',
+ '-ex', 'set pagination 0',
+ '-ex', 'continue',
+ '-ex', 'backtrace full',
+ '-ex', 'info registers',
+ '-ex', 'thread apply all backtrace',
+ '-ex', 'quit',
+ '../../bitlbee', str(bitlbee.pid) ])
bitlbee_mock = open("t/%s-bitlbee.mock" % name)
for i in bitlbee_mock.readlines():
line = i.strip()