From: Ian Jackson Date: Fri, 27 Apr 2007 15:06:24 +0000 (+0100) Subject: * Fix handling of pre-built source trees. X-Git-Tag: converted-from-bzr~59 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1933add9cbc6daf4edb1e2873a9110e665171839;p=autopkgtest.git * Fix handling of pre-built source trees. * Fix cleanup handling not to delete tmpdir before resetting testbed's apt. --- diff --git a/debian/changelog b/debian/changelog index 3d4bec5..f57300c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -autopkgtest (0.8.1feisty1~iwj) feisty-updates; urgency=low +autopkgtest (0.8.1feisty1~iwj2) feisty-updates; urgency=low * Fix fd handling to work around Python's habit of closing files you specify in subprocess.Popen. @@ -11,8 +11,11 @@ autopkgtest (0.8.1feisty1~iwj) feisty-updates; urgency=low certain hangs during error situations. * Xen cleanup script runs dmsetup info / dmsetup remove several times with some sleeps because xm destroy is not properly instantaneous. + * Fix handling of pre-built source trees. + * Fix cleanup handling not to delete tmpdir before resetting testbed's + apt. - -- Ian Jackson Fri, 27 Apr 2007 14:38:49 +0100 + -- Ian Jackson Fri, 27 Apr 2007 16:06:15 +0100 autopkgtest (0.8.1) feisty; urgency=low diff --git a/runner/adt-run b/runner/adt-run index b33c5ba..9a4c686 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -1050,7 +1050,8 @@ class Test: use_dir = testbed.scratch return RelativeOutputFile(idstr, use_dir, idstr) - t.act.work.write(True) + if hasattr(t.act,'work'): t.act.work.write(True) + tree.read(True) af = RelativeInputFile(t.what, tree, t.path) so = stdouterr('stdout') @@ -1058,7 +1059,6 @@ class Test: tf = af.read(True) tmpdir = None - tree.read(True) rc = testbed.execute('testchmod-'+t.what, ['chmod','+x','--',tf]) if rc: bomb('failed to chmod +x %s' % tf) @@ -1215,13 +1215,11 @@ def print_exception(ei, msgprefix=''): def cleanup(): global trace_stream try: - rm_ec = 0 - if opts.tmpdir is None and tmpdir is not None: - rmtree('tmpdir', tmpdir) if testbed is not None: testbed.reset_apt() testbed.stop() - if rm_ec: bomb('rm -rf -- %s failed, code %d' % (tmpdir, ec)) + if opts.tmpdir is None and tmpdir is not None: + rmtree('tmpdir', tmpdir) if trace_stream is not None: trace_stream.close() trace_stream = None