From f4ef052dc75e2105695ded3f05ac0adee4d1c5d3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 13 Feb 2007 20:27:13 +0000 Subject: [PATCH] debugging new adt-run, still wip --- runner/adt-run | 239 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 156 insertions(+), 83 deletions(-) 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 = '