[driver] do not run the analysis in Buck flavors sub-processes

Summary:
`infer capture -a checkers ...` would accidentally trigger the analysis phase.
This crashes the Buck flavors integration when used with `--reactive` because
.start never gets created in the infer-out-* subfolders of buck-out.

Reviewed By: dulmarod

Differential Revision: D6336072

fbshipit-source-id: af0ab5e
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent cdd3208cd6
commit 2ff05385dc

@ -189,4 +189,3 @@ let register_perf_stats_report () =
let stats_base = Config.perf_stats_prefix ^ Filename.basename cluster ^ ".json" in let stats_base = Config.perf_stats_prefix ^ Filename.basename cluster ^ ".json" in
let stats_file = Filename.concat stats_dir stats_base in let stats_file = Filename.concat stats_dir stats_base in
PerfStats.register_report_at_exit stats_file PerfStats.register_report_at_exit stats_file

@ -382,19 +382,19 @@ let report ?(suppress_console= false) () =
let analyze_and_report ?suppress_console_report ~changed_files mode = let analyze_and_report ?suppress_console_report ~changed_files mode =
let should_analyze, should_report = let should_analyze, should_report =
match (mode, Config.analyzer) with match (Config.command, mode, Config.analyzer) with
| PythonCapture (BBuck, _), _ when not Config.flavors -> | _, PythonCapture (BBuck, _), _ when not Config.flavors ->
(* In Buck mode when compilation db is not used, analysis is invoked from capture if buck flavors are not used *) (* In Buck mode when compilation db is not used, analysis is invoked from capture if buck flavors are not used *)
(false, false) (false, false)
| _ when Config.infer_is_clang || Config.infer_is_javac -> | _ when Config.infer_is_clang || Config.infer_is_javac ->
(* Called from another integration to do capture only. *) (* Called from another integration to do capture only. *)
(false, false) (false, false)
| _, (CaptureOnly | CompileOnly) -> | _, _, Linters ->
(false, true)
| (Capture | Compile), _, _ | _, _, (CaptureOnly | CompileOnly) ->
(false, false) (false, false)
| _, (BiAbduction | Checkers | Crashcontext) -> | _, _, (BiAbduction | Checkers | Crashcontext) ->
(true, true) (true, true)
| _, Linters ->
(false, true)
in in
let should_merge = let should_merge =
match mode with match mode with
@ -579,4 +579,3 @@ let read_config_changed_files () =
| Error error -> | Error error ->
L.external_error "Error reading the changed files index '%s': %s@." index error ; L.external_error "Error reading the changed files index '%s': %s@." index error ;
None None

Loading…
Cancel
Save