From 5f9efcefb72aec8cec9012d3286ed4bd1219a574 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Wed, 2 Mar 2016 13:34:50 +0100 Subject: [PATCH] Make select non blocking --- bin/runTests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/runTests.py b/bin/runTests.py index f2695127f..a56dfd7ea 100644 --- a/bin/runTests.py +++ b/bin/runTests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2015, 2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -82,7 +82,7 @@ def __runTest(command, workdir): while True: reads = [p.stdout.fileno(), p.stderr.fileno()] - ret = select.select(reads, [], []) + ret = select.select(reads, [], [], 0) for fd in ret[0]: if fd == p.stdout.fileno(): @@ -97,7 +97,8 @@ def __runTest(command, workdir): pass pass - if p.poll() != None: + returncode = p.poll() + if not returncode is None: break pass -- 2.39.2