fixing issue where crashcontext breaks without -o

Reviewed By: lazaroclapp

Differential Revision: D3823554

fbshipit-source-id: 8c0b329
master
Sam Blackshear 8 years ago committed by Facebook Github Bot 2
parent f3cdf87181
commit 87248009b7

@ -70,17 +70,21 @@ let stitch_summaries stacktrace_file summary_files out_file =
let collect_all_summaries root_summaries_dir stacktrace_file stacktraces_dir =
let method_summaries =
let path_regexp = Str.regexp ".*crashcontext/.*\\..*\\.json" in
let path_matcher path = Str.string_match path_regexp path 0 in
DB.paths_matching root_summaries_dir path_matcher in
Utils.directory_fold
(fun summaries path ->
(* check if the file is a JSON file under the crashcontext dir *)
if not (Sys.is_directory path) && Filename.check_suffix path "json" &&
string_is_suffix "crashcontext" (Filename.dirname path)
then path :: summaries
else summaries)
[]
root_summaries_dir in
let pair_for_stacktrace_file = match stacktrace_file with
| None -> None
| Some file -> begin
let crashcontext_dir =
Config.results_dir // "crashcontext" in
| Some file ->
let crashcontext_dir = Config.results_dir // "crashcontext" in
DB.create_dir crashcontext_dir;
Some (file, crashcontext_dir // "crashcontext.json")
end in
Some (file, crashcontext_dir // "crashcontext.json") in
let trace_file_regexp = Str.regexp "\\(.*\\)\\.json" in
let pairs_for_stactrace_dir = match stacktraces_dir with
| None -> []

@ -15,7 +15,7 @@ java_library(
]
)
out = 'out'
out = 'infer-out'
inferconfig_file = '$(location //infer/tests/codetoanalyze/java:inferconfig)'
copy_inferconfig = ' '.join(['cp', inferconfig_file, '$SRCDIR'])
clean_cmd = ' '.join(['rm', '-rf', out])
@ -26,7 +26,6 @@ def mk_infer_cmd(tag, srcs, stacktrace):
'infer',
'--no-progress-bar',
'--absolute-paths',
'-o', out,
'-a', 'crashcontext',
'--stacktrace', stacktrace,
'--',

Loading…
Cancel
Save