From: Ian Jackson Date: Tue, 13 Feb 2007 20:27:13 +0000 (+0000) Subject: debugging new adt-run, still wip X-Git-Tag: converted-from-bzr~32^3~54 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f4ef052dc75e2105695ded3f05ac0adee4d1c5d3;p=autopkgtest.git debugging new adt-run, still wip --- diff --git a/runner/adt-run b/runner/adt-run index 88212e6..360fb7e 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -74,7 +74,27 @@ class Unsupported: def debug(m): global opts if not opts.debug: return - print >>sys.stderr, 'atd-run: debug:', m + for l in m.rstrip('\n').split('\n'): + print >>sys.stderr, 'atd-run: debug:', l + +def rmtree(what, pathname): + debug('//rmtree (%s) %s' % (what, pathname)) + shutil.rmtree(pathname) + +def debug_subprocess(what, cmdl=None, script=None): + o = '$ '+what+':' + if cmdl is not None: + ol = [] + for x in cmdl: + if x is script: x = '