[buck] Non compilation-database do not support _test targets

Summary:
When refactoring `Buck.ml` I took the list of accepted kinds that was used for compilation database.
However `#infer-capture-all` flavor is not supported by `cxx_test` targets.

Reviewed By: dulmarod

Differential Revision: D6335543

fbshipit-source-id: db3a5f4
master
Mehdi Bouaziz 7 years ago committed by Facebook Github Bot
parent f63f48a52e
commit 262bb4171d

@ -133,7 +133,10 @@ let parameters_with_argument =
["--build-report"; "--config"; "-j"; "--num-threads"; "--out"; "-v"; "--verbose"] ["--build-report"; "--config"; "-j"; "--num-threads"; "--out"; "-v"; "--verbose"]
let accepted_buck_kinds_pattern = "(apple|cxx)_(binary|library|test)" let get_accepted_buck_kinds_pattern () =
if Option.is_some Config.buck_compilation_database then "(apple|cxx)_(binary|library|test)"
else "(apple|cxx)_(binary|library)"
let max_command_line_length = 50 let max_command_line_length = 50
@ -142,8 +145,8 @@ let die_if_empty f = function [] -> f L.(die UserError) | l -> l
let resolve_pattern_targets ~filter_kind ~dep_depth targets = let resolve_pattern_targets ~filter_kind ~dep_depth targets =
targets |> List.rev_map ~f:Query.target |> Query.set targets |> List.rev_map ~f:Query.target |> Query.set
|> (match dep_depth with None -> Fn.id | Some depth -> Query.deps ?depth) |> (match dep_depth with None -> Fn.id | Some depth -> Query.deps ?depth)
|> (if filter_kind then Query.kind ~pattern:accepted_buck_kinds_pattern else Fn.id) |> Query.exec |> (if filter_kind then Query.kind ~pattern:(get_accepted_buck_kinds_pattern ()) else Fn.id)
|> die_if_empty (fun die -> die "*** buck query returned no targets.") |> Query.exec |> die_if_empty (fun die -> die "*** buck query returned no targets.")
let resolve_alias_targets aliases = let resolve_alias_targets aliases =

Loading…
Cancel
Save