From 1acc0bb23795010c761bab0f396a31543e7f0121 Mon Sep 17 00:00:00 2001 From: "tbreisacher@chromium.org" Date: Tue, 7 Feb 2012 05:59:26 +0000 Subject: Adds '#'s to the beginning of each output line when running with -d This way, if the output format changes in a way that confuses the bot running sizes.py, we can tell the bot to just ignore lines that start with '#'. See http://codereview.chromium.org/9323047/#msg11 BUG=102013 TEST=none Review URL: https://chromiumcodereview.appspot.com/9347013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120726 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/linux/dump-static-initializers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/linux') diff --git a/tools/linux/dump-static-initializers.py b/tools/linux/dump-static-initializers.py index 61261cb8..584e222 100755 --- a/tools/linux/dump-static-initializers.py +++ b/tools/linux/dump-static-initializers.py @@ -147,7 +147,7 @@ def main(): parser.add_option('-d', '--diffable', dest='diffable', action='store_true', default=False, help='Prints the filename on each line, for more easily ' - 'diff-able output.') + 'diff-able output. (Used by sizes.py)') opts, args = parser.parse_args() if len(args) != 1: parser.error('missing filename argument') @@ -183,12 +183,14 @@ def main(): ref_output.append(' ' + ref) if opts.diffable: - print '\n'.join(qualified_filename + r for r in ref_output) + print '\n'.join('# ' + qualified_filename + r for r in ref_output) else: print '%s (initializer offset 0x%x size 0x%x)' % (qualified_filename, addr, size) print '\n'.join(ref_output) + '\n' + if opts.diffable: + print '#', print 'Found %d static initializers in %d files.' % (initializer_count, file_count) -- cgit v1.1