From 3db6d8352a993f64380c21c2b29d30ae7f79e4cc Mon Sep 17 00:00:00 2001 From: Siu Kwan Lam Date: Thu, 16 Jan 2014 18:34:19 -0600 Subject: [PATCH] Fix isolated test runner --- llvm/tests/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/tests/__init__.py b/llvm/tests/__init__.py index 64f55fb..67102c7 100644 --- a/llvm/tests/__init__.py +++ b/llvm/tests/__init__.py @@ -55,14 +55,14 @@ def run(verbosity=1): for test in isolated_tests: print(('testing %s' % test).center(80)) - cmd = [sys.executable, '-m', test] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - for line in p.stdout: - print(line.decode('utf8'), end='') - p.wait() - if p.returncode: - raise Exception("%s returned: %d" % p.returncode) + cmd = [sys.executable, '-m', test] + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + for line in p.stdout: + print(line.decode('utf8'), end='') + p.wait() + if p.returncode: + raise Exception("%s returned: %d" % (test, p.returncode)) return testresult