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 -> []