]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
mac: emit the stdout and stderr from a failed call to Allmydata (this is very useful...
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 15 Jul 2009 01:43:38 +0000 (18:43 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 15 Jul 2009 01:43:38 +0000 (18:43 -0700)
misc/test_mac_diskimage.py

index fc0c30f4e0fbfbdd1d436d14e63a749a2ef72b13..7795dfd162d508ccdb8679272e62903a2149e44f 100644 (file)
@@ -55,11 +55,8 @@ def test_mac_diskimage(appname, version):
             if rc is not None:
                 break
             if time.time() > deadline:
-                flags = fcntl.fcntl(callit.stdout.fileno(), fcntl.F_GETFL)
-                fcntl.fcntl(callit.stdout.fileno(), fcntl.F_SETFL, flags | os.O_NONBLOCK)
-                flags = fcntl.fcntl(callit.stderr.fileno(), fcntl.F_GETFL)
-                fcntl.fcntl(callit.stderr.fileno(), fcntl.F_SETFL, flags | os.O_NONBLOCK)
-                raise Exception("FAIL: it took longer than 2 seconds to invoke $appname --version-and-path. stdout: %r, stderr: %r" % (callit.stdout.read(), callit.stderr.read()))
+                os.kill(callitpid, 15)
+                raise Exception("FAIL: it took longer than 2 seconds to invoke $appname --version-and-path. stdout: %s, stderr: %s" % (callit.stdout.read(), callit.stderr.read()))
             time.sleep(0.05)
 
         if rc != 0: