Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: client/tests/kvm/cd_hash.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 """ 2 """
3 Program that calculates several hashes for a given CD image. 3 Program that calculates several hashes for a given CD image.
4 4
5 @copyright: Red Hat 2008-2009 5 @copyright: Red Hat 2008-2009
6 """ 6 """
7 7
8 import os, sys, optparse, logging 8 import os, sys, optparse, logging
9 import common 9 import common
10 import kvm_utils 10 import kvm_utils
11 from autotest_lib.client.common_lib import logging_config, logging_manager 11 from autotest_lib.client.common_lib import logging_manager
12 from autotest_lib.client.bin import utils 12 from autotest_lib.client.bin import utils
13 13
14 14
15 if __name__ == "__main__": 15 if __name__ == "__main__":
16 parser = optparse.OptionParser("usage: %prog [options] [filenames]") 16 parser = optparse.OptionParser("usage: %prog [options] [filenames]")
17 options, args = parser.parse_args() 17 options, args = parser.parse_args()
18 18
19 logging_manager.configure_logging(kvm_utils.KvmLoggingConfig()) 19 logging_manager.configure_logging(kvm_utils.KvmLoggingConfig())
20 20
21 if args: 21 if args:
(...skipping 17 matching lines...) Expand all
39 39
40 logging.info("Hash values for file %s", os.path.basename(filename)) 40 logging.info("Hash values for file %s", os.path.basename(filename))
41 logging.info("md5 (1m): %s", utils.hash_file(filename, 1024*1024, 41 logging.info("md5 (1m): %s", utils.hash_file(filename, 1024*1024,
42 method="md5")) 42 method="md5"))
43 logging.info("sha1 (1m): %s", utils.hash_file(filename, 1024*1024, 43 logging.info("sha1 (1m): %s", utils.hash_file(filename, 1024*1024,
44 method="sha1")) 44 method="sha1"))
45 logging.info("md5 (full): %s", utils.hash_file(filename, method="md5")) 45 logging.info("md5 (full): %s", utils.hash_file(filename, method="md5"))
46 logging.info("sha1 (full): %s", utils.hash_file(filename, 46 logging.info("sha1 (full): %s", utils.hash_file(filename,
47 method="sha1")) 47 method="sha1"))
48 logging.info("") 48 logging.info("")
OLDNEW
« cli/job.py ('K') | « client/tests/kvm/build.cfg.sample ('k') | client/tests/kvm/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698