diff options
author | bevc@chromium.org <bevc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 22:53:19 +0000 |
---|---|---|
committer | bevc@chromium.org <bevc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 22:53:19 +0000 |
commit | 643392dea6e2a3d07e4451e3bcb07650fa941dad (patch) | |
tree | 5bf9c75e6b49c10674e6fd59640b46bb0372c433 | |
parent | 29e90295e13f0026fa58b0b842adea8164fcc287 (diff) | |
download | chromium_src-643392dea6e2a3d07e4451e3bcb07650fa941dad.zip chromium_src-643392dea6e2a3d07e4451e3bcb07650fa941dad.tar.gz chromium_src-643392dea6e2a3d07e4451e3bcb07650fa941dad.tar.bz2 |
Clean up coverity intermediate directory prior to running analysis
(Per advice from Coverity rep)
BUG=none
TEST=ran this overnight on our Linux and Mac coverity machines, worked.
Review URL: http://codereview.chromium.org/2861078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53545 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | tools/coverity/coverity.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/coverity/coverity.py b/tools/coverity/coverity.py index 5b20c87..896ebc6 100644 --- a/tools/coverity/coverity.py +++ b/tools/coverity/coverity.py @@ -154,6 +154,16 @@ def main(options, args): else: shutil.rmtree(rm_path,True) + if options.preserve_intermediate_dir: + print 'Preserving intermediate directory.' + else: + if options.dry_run: + print 'shutil.rmtree(%s)' % repr(options.coverity_intermediate_dir) + print 'os.mkdir(%s)' % repr(options.coverity_intermediate_dir) + else: + shutil.rmtree(options.coverity_intermediate_dir,True) + os.mkdir(options.coverity_intermediate_dir) + print 'Elapsed time: %ds' % (time.time() - start_time) use_shell_during_make = False @@ -280,6 +290,12 @@ if '__main__' == __name__: help='file containing the coverity password', default='coverity-password') + helpmsg = ('By default, the intermediate dir is emptied before analysis. ' + 'This switch disables that behavior.') + option_parser.add_option('', '--preserve-intermediate-dir', + action='store_true', help=helpmsg, + default=False) + options, args = option_parser.parse_args() result = main(options, args) |