summaryrefslogtreecommitdiffstats
path: root/tools/checkbins
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:36:40 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 22:36:40 +0000
commit89f008927b90c6d8997416e766e7340c158093c3 (patch)
tree2264e6b95e666f2bc545c30f5d4d3ebd1c792c27 /tools/checkbins
parent85d61a05f6c55f38f219d9a3ff0c5bec66db7e72 (diff)
downloadchromium_src-89f008927b90c6d8997416e766e7340c158093c3.zip
chromium_src-89f008927b90c6d8997416e766e7340c158093c3.tar.gz
chromium_src-89f008927b90c6d8997416e766e7340c158093c3.tar.bz2
Remove verbosity from checkbins.py and print summary instead
BUG=25952 TEST=no more verbosity! Review URL: http://codereview.chromium.org/368002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/checkbins')
-rwxr-xr-xtools/checkbins/checkbins.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/checkbins/checkbins.py b/tools/checkbins/checkbins.py
index 5d8ce53..05fc81f 100755
--- a/tools/checkbins/checkbins.py
+++ b/tools/checkbins/checkbins.py
@@ -29,13 +29,16 @@ def IsPEFile(path):
def main(options, args):
directory = args[0]
- success = True
+ pe_total = 0
+ pe_passed = 0
for file in os.listdir(directory):
path = os.path.abspath(os.path.join(directory, file))
if not IsPEFile(path):
continue
pe = pefile.PE(path, fast_load=True)
+ pe_total = pe_total + 1
+ success = True
# Check for /DYNAMICBASE.
if pe.OPTIONAL_HEADER.DllCharacteristics & DYNAMICBASE_FLAG:
@@ -53,18 +56,20 @@ def main(options, args):
success = False
print "Checking %s for /NXCOMPAT... FAIL" % path
- if not success:
+ # Update tally.
+ if success:
+ pe_passed = pe_passed + 1
+
+ print "Result: %d files found, %d files passed" % (pe_total, pe_passed)
+ if pe_passed != pe_total:
# TODO(scherkus): change this back to 1 once I've fixed failing builds.
sys.exit(0)
if __name__ == '__main__':
usage = "Usage: %prog [options] DIRECTORY"
option_parser = optparse.OptionParser(usage=usage)
-
- # TODO(scherkus): change the default back to False once I've verified this
- # tool actually does something on the bots.
option_parser.add_option("-v", "--verbose", action="store_true",
- default=True, help="Print debug logging")
+ default=False, help="Print debug logging")
options, args = option_parser.parse_args()
if not args:
option_parser.print_help()