chiark / gitweb /
* Fix handling of pre-built source trees.
authorIan Jackson <ian@anarres>
Fri, 27 Apr 2007 15:06:24 +0000 (16:06 +0100)
committerIan Jackson <ian@anarres>
Fri, 27 Apr 2007 15:06:24 +0000 (16:06 +0100)
* Fix cleanup handling not to delete tmpdir before resetting testbed's
  apt.

debian/changelog
runner/adt-run

index 3d4bec5adf7d0a9c7d4d9f10722c16521702779b..f57300c1a88ba12a5b874deee501a95d7c7aac40 100644 (file)
@@ -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 <ian@davenant.greenend.org.uk>  Fri, 27 Apr 2007 14:38:49 +0100
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Fri, 27 Apr 2007 16:06:15 +0100
 
 autopkgtest (0.8.1) feisty; urgency=low
 
index b33c5ba69ce17620911e409023872c1d28264c44..9a4c686bc74befc560feedf8b8700c99aa135aa7 100755 (executable)
@@ -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