mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Update post_build_ninja_summary.py for Linux
post_build_ninja_summary.py gives a summary of a ninja build. It can be run standalone or it can be run automatically by autoninja. This CL updates the Python script and the autoninja bash script to make this work on Linux. This includes removing a zero-value assert, and ensuring that .so files get categorized as such. Change-Id: I2d59ab129f5ce70117beeb119719f8432bfbab7c Reviewed-on: https://chromium-review.googlesource.com/915053 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This commit is contained in:
@@ -9,4 +9,8 @@
|
|||||||
# Also print it to reassure that the right settings are being used.
|
# Also print it to reassure that the right settings are being used.
|
||||||
command=$(python $(dirname -- "$0")/autoninja.py "$@")
|
command=$(python $(dirname -- "$0")/autoninja.py "$@")
|
||||||
echo $command
|
echo $command
|
||||||
exec $command
|
$command
|
||||||
|
if [ $? -eq 0 ] && [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then
|
||||||
|
python $(dirname -- "$0")/post_build_ninja_summary.py $@
|
||||||
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
This script is designed to be automatically run after each ninja build in
|
This script is designed to be automatically run after each ninja build in
|
||||||
order to summarize the build's performance. Making build performance information
|
order to summarize the build's performance. Making build performance information
|
||||||
more visible should make it easier to notice anomalies and opportunities. To use
|
more visible should make it easier to notice anomalies and opportunities. To use
|
||||||
this script just set NINJA_SUMMARIZE_BUILD=1 and run autoninja.bat.
|
this script on Windows just set NINJA_SUMMARIZE_BUILD=1 and run autoninja.bat.
|
||||||
|
|
||||||
|
On Linux you can get autoninja to invoke this script using this syntax:
|
||||||
|
|
||||||
|
$ NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default/ chrome
|
||||||
|
|
||||||
You can also call this script directly using ninja's syntax to specify the
|
You can also call this script directly using ninja's syntax to specify the
|
||||||
output directory of interest:
|
output directory of interest:
|
||||||
@@ -159,13 +163,15 @@ def GetExtension(target):
|
|||||||
extension = os.path.splitext(output)[1]
|
extension = os.path.splitext(output)[1]
|
||||||
if len(extension) == 0:
|
if len(extension) == 0:
|
||||||
extension = '(no extension found)'
|
extension = '(no extension found)'
|
||||||
# AHEM____.TTF fails this check.
|
|
||||||
assert(extension == extension.lower() or extension == '.TTF')
|
|
||||||
if extension in ['.pdb', '.dll', '.exe']:
|
if extension in ['.pdb', '.dll', '.exe']:
|
||||||
extension = 'PEFile (linking)'
|
extension = 'PEFile (linking)'
|
||||||
# Make sure that .dll and .exe are grouped together and that the
|
# Make sure that .dll and .exe are grouped together and that the
|
||||||
# .dll.lib files don't cause these to be listed as libraries
|
# .dll.lib files don't cause these to be listed as libraries
|
||||||
break
|
break
|
||||||
|
if extension in ['.so', '.TOC']:
|
||||||
|
extension = '.so (linking)'
|
||||||
|
# Attempt to identify linking, avoid identifying as '.TOC'
|
||||||
|
break
|
||||||
return extension
|
return extension
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user