summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shubham Ajmera <shubhamajmera@google.com> 2017-05-08 13:52:46 -0700
committer Shubham Ajmera <shubhamajmera@google.com> 2017-05-08 13:52:46 -0700
commitb4949f536d63eb5c9e6654a86a34488807ef3665 (patch)
treee661e72a916009a39e1d6190a2d50f0cfa466cf1
parent3650acb134b4e68ba3f190772b02105f74081bf2 (diff)
Testrunner: Fix --gdb issue
Testrunner was eating up the output of gdb. With the change, it will print the entire run-test script output with --gdb. Test: ./art/test/testrunner/testrunner.py --gdb -t 001-H Change-Id: I35254d0a67380946e1f033ec2a46a6bf272d4adc
-rwxr-xr-xtest/testrunner/testrunner.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index a80924639b..9a437cc822 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -497,7 +497,11 @@ def run_test(command, test, test_variant, test_name):
test_skipped = True
else:
test_skipped = False
- proc = subprocess.Popen(command.split(), stderr=subprocess.STDOUT, stdout=subprocess.PIPE, universal_newlines=True)
+ if gdb:
+ proc = subprocess.Popen(command.split(), stderr=subprocess.STDOUT, universal_newlines=True)
+ else:
+ proc = subprocess.Popen(command.split(), stderr=subprocess.STDOUT, stdout = subprocess.PIPE,
+ universal_newlines=True)
script_output = proc.communicate(timeout=timeout)[0]
test_passed = not proc.wait()