From: Vince Harron Date: Mon, 19 Jan 2015 18:18:24 +0000 (+0000) Subject: Print out the full output of gtest X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db93444f26d763cc5e1bbf43d7f59892c708673b;p=platform%2Fupstream%2Fllvm.git Print out the full output of gtest This patch fixes a bug that prevented all gtest output from being displayed. Submitted for Tamas Berghammer llvm-svn: 226477 --- diff --git a/lldb/gtest/do-gtest.py b/lldb/gtest/do-gtest.py index 46fa619..79cc020e 100755 --- a/lldb/gtest/do-gtest.py +++ b/lldb/gtest/do-gtest.py @@ -63,8 +63,7 @@ def line_combine_printer(file, previous_data, new_line_subn_result): return (new_line, remaining_count) else: # Time to write it out. - if len(new_line) > 0: - print(new_line, file=file) + print(new_line, file=file) return ("", 0) def call_make(makefile_dir, extra_args=None, stdout=sys.stdout, stderr=sys.stderr): @@ -98,17 +97,17 @@ def call_make(makefile_dir, extra_args=None, stdout=sys.stdout, stderr=sys.stder # Drain stdout. while True: - line = proc.stdout.readline().rstrip() + line = proc.stdout.readline() if line and len(line) > 0: - stdout_data = line_combine_printer(stdout, stdout_data, filter_run_line(sub_expr, line)) + stdout_data = line_combine_printer(stdout, stdout_data, filter_run_line(sub_expr, line.rstrip())) else: break # Drain stderr. while True: - line = proc.stderr.readline().rstrip() + line = proc.stderr.readline() if line and len(line) > 0: - stderr_data = line_combine_printer(stderr, stderr_data, filter_run_line(sub_expr, line)) + stderr_data = line_combine_printer(stderr, stderr_data, filter_run_line(sub_expr, line.rstrip())) else: break