未验证 提交 f3b7ed40 编写于 作者: X xster 提交者: GitHub

Let run_tests.py just stream output (#18534)

上级 72f7a7c4
......@@ -463,7 +463,7 @@ action("robolectric_tests") {
embedding_jar_path,
] + embedding_dependencies_jars
inputs = _jar_dependencies
inputs = _jar_dependencies + additional_jar_files
_rebased_current_path = rebase_path(".")
_rebased_jar_path = rebase_path(jar_path, root_build_dir)
......
......@@ -38,14 +38,10 @@ def RunCmd(cmd, **kwargs):
print 'Running command "%s"' % command_string
start_time = time.time()
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs)
(output, _) = process.communicate()
process = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stderr, **kwargs)
process.communicate()
end_time = time.time()
# Print the result no matter what.
for line in output.splitlines():
print line
if process.returncode != 0:
PrintDivider('!')
raise Exception('Command "%s" exited with code %d' % (command_string, process.returncode))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册