From e5ee17e8aa0e84e43b436d8ca369836b9f434f38 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 5 Oct 2017 06:21:29 -0700 Subject: [PATCH] [buck] do not bin the contents of buck-out if --continue is passed Summary: This allows the capture to continue in Buck flavors mode. Reviewed By: dulmarod Differential Revision: D5985376 fbshipit-source-id: e033006 --- infer/lib/python/inferlib/analyze.py | 4 ++++ infer/lib/python/inferlib/capture/buck.py | 2 +- infer/src/integration/Driver.ml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/infer/lib/python/inferlib/analyze.py b/infer/lib/python/inferlib/analyze.py index c10c8421d..19fccdaa1 100644 --- a/infer/lib/python/inferlib/analyze.py +++ b/infer/lib/python/inferlib/analyze.py @@ -30,6 +30,10 @@ base_group.add_argument('-o', '--out', metavar='', type=utils.decode, action=utils.AbsolutePathAction, help='Set the Infer results directory') +base_group.add_argument('--continue', dest="continue_capture", + action='store_true', + help='''Continue the capture, do not delete previous + results''') base_group.add_argument('-r', '--reactive', action='store_true', help='''Analyze in reactive propagation mode starting from changed files.''') diff --git a/infer/lib/python/inferlib/capture/buck.py b/infer/lib/python/inferlib/capture/buck.py index 58a9b94fb..ddd1ffe88 100644 --- a/infer/lib/python/inferlib/capture/buck.py +++ b/infer/lib/python/inferlib/capture/buck.py @@ -236,7 +236,7 @@ class BuckAnalyzer: raise e def capture_with_flavors(self): - if self.keep_going: + if self.keep_going and not self.args.continue_capture: self._move_buck_out() ret = self._run_buck_with_flavors() if not ret == os.EX_OK and not self.keep_going: diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 2df756b3c..ba155ca4b 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -285,6 +285,7 @@ let capture ~changed_files mode = -> ["--blacklist-regex"; s] | _ -> [] ) + @ (if not Config.continue_capture then [] else ["--continue"]) @ ( match Config.java_jar_compiler with | None -> []