From 7d11434e9c483d92dc7909d08ab0a8e59a890129 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Fri, 14 Feb 2014 09:17:24 +0100 Subject: Fetch timeafter when the compilation is done. Popen returns when the new process is opened, not when it's done. --- run.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/run.py b/run.py index 5ae8d90..82559fe 100755 --- a/run.py +++ b/run.py @@ -47,12 +47,6 @@ def run_test(filename): command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - except: - return filename + " FAIL" - - timeafter = time.time() - - try: (stdout, stderr) = p.communicate() results = (stdout + stderr).decode("utf-8") except KeyboardInterrupt: @@ -60,6 +54,8 @@ def run_test(filename): except: return filename + " FAIL\n" + timeafter = time.time() + with open(filename + '.out', 'w') as file: file.write(results) -- cgit v1.2.3