autoninja: Don't echo command-line unless NINJA_SUMMARIZE_BUILD=1

I want to use autoninja from //build/android/generate_gradle.py, but I
invoke it with a *long* list of targets that I do not want echo'ed

Bug: 803493
Change-Id: I98ad85b64ec7ce60b7e3df9827fb613cd57638e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1596535
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
changes/35/1596535/4
Andrew Grieve 6 years ago committed by Commit Bot
parent dc8e23d356
commit 94bcf1e49b

@ -11,7 +11,9 @@ export AUTONINJA_BUILD_ID
# Execute whatever is printed by autoninja.py.
# Also print it to reassure that the right settings are being used.
command=$(python "$(dirname -- "$0")/autoninja.py" "$@")
echo "$command"
if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
echo "$command"
fi
if eval "$command"; then
if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
python "$(dirname -- "$0")/post_build_ninja_summary.py" "$@"

Loading…
Cancel
Save