Commit 72c516f9 authored by Nate Fischer's avatar Nate Fischer Committed by Chromium LUCI CQ

Android: print bundletool output

This configures bundletool.py to print bundletool.jar's stdout if it's
invoked as a script. This is necessary for commands like "bundletool
version" which print to stdout. This does not change the default
behavior for the programmatic interface.

Bug: 1165897
Test: build/android/gyp/bundletool.py version
Change-Id: I0422c46bcdb0399d63b205ca7b92db9c50de7851
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2625747
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842754}
parent 4ed48b0a
......@@ -25,7 +25,7 @@ BUNDLETOOL_JAR_PATH = os.path.join(
BUNDLETOOL_DIR, 'bundletool-all-%s.jar' % BUNDLETOOL_VERSION)
def RunBundleTool(args, warnings_as_errors=()):
def RunBundleTool(args, warnings_as_errors=(), print_stdout=False):
# Use () instead of None because command-line flags are None by default.
verify = warnings_as_errors == () or warnings_as_errors
# ASAN builds failed with the default of 1GB (crbug.com/1120202).
......@@ -36,10 +36,11 @@ def RunBundleTool(args, warnings_as_errors=()):
logging.debug(' '.join(cmd))
return build_utils.CheckOutput(
cmd,
print_stdout=print_stdout,
print_stderr=True,
fail_on_output=False,
stderr_filter=build_utils.FilterReflectiveAccessJavaWarnings)
if __name__ == '__main__':
RunBundleTool(sys.argv[1:])
RunBundleTool(sys.argv[1:], print_stdout=True)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment