Add a SIGUSR1 handling to trigger pdb.set_trace().
authorZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 05:02:09 +0000 (22:02 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 05:02:09 +0000 (22:02 -0700)
pym/portage/tests/runTests

index 05dd773c9f31e916f945b88e49575cd928961caf..6b3311d2880ddb2441cf2266c65eca8d0b870e03 100755 (executable)
@@ -7,6 +7,12 @@ import os, sys
 import os.path as osp
 import grp
 import pwd
+import signal
+
+def debug_signal(signum, frame):
+       import pdb
+       pdb.set_trace()
+signal.signal(signal.SIGUSR1, debug_signal)
 
 # Pretend that the current user's uid/gid are the 'portage' uid/gid,
 # so things go smoothly regardless of the current user and global