From 6cbaaf31b53c3d0075693bcf2cea439589fc116e Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Tue, 14 Jul 2009 18:43:38 -0700 Subject: [PATCH] mac: emit the stdout and stderr from a failed call to Allmydata (this is very useful diagnostic info) --- misc/test_mac_diskimage.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/misc/test_mac_diskimage.py b/misc/test_mac_diskimage.py index fc0c30f4..7795dfd1 100644 --- a/misc/test_mac_diskimage.py +++ b/misc/test_mac_diskimage.py @@ -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: -- 2.45.2