Let run_tests.py just stream output (#18534)

This commit is contained in:
xster 2020-05-20 21:38:37 -07:00 committed by GitHub
parent 72f7a7c4ea
commit f3b7ed4078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -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)

View File

@ -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))