Added verbose flag to test driver.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Thu, 1 Apr 2010 20:28:32 +0000 (16:28 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Thu, 1 Apr 2010 20:28:32 +0000 (16:28 -0400)
test/run-testcase.py

index 513829506803fca88e8c5aa2e2d7836493883b25..808dd4d9cc94de1c10bcaf7cc753d64670a88ca7 100755 (executable)
@@ -414,7 +414,8 @@ def runGCC(args, compile_fail_msg):
 
     args = [gcc_path] + args
     try:
-        gcc_proc = subprocess.Popen(args, stderr = subprocess.PIPE)
+        gcc_proc = subprocess.Popen(args, stdout = subprocess.PIPE,
+                                    stderr = subprocess.STDOUT)
     except OSError as e:
         if e.errno == errno.ENOENT:
             print "Fatal -- Bad path to GCC:", gcc_path
@@ -428,8 +429,10 @@ def runGCC(args, compile_fail_msg):
 
     if gcc_proc.returncode != 0:
         print compile_fail_msg
-        print stderrdata
+        print stdoutdata
         return False
+    elif verbose:
+        print stdoutdata
 
     return True