[diff] run driver prologue and epilogue before diff analysis

Summary:
This was an oversight. The prologue has to be run before capture and analysis
(see eg Infer.run). This sets up a bunch of things that are useful for the
diff analysis as well.

Reviewed By: jeremydubreil

Differential Revision: D5499405

fbshipit-source-id: 8f339cf
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent e0ad3a9d75
commit 3c215b8484

@ -44,6 +44,7 @@ let save_report revision =
report_name report_name
let diff driver_mode = let diff driver_mode =
Driver.run_prologue driver_mode ;
(* TODO(t15553258) run gen-build script if specified *) (* TODO(t15553258) run gen-build script if specified *)
(* run capture *) (* run capture *)
Driver.capture driver_mode ~changed_files:None ; Driver.capture driver_mode ~changed_files:None ;
@ -61,5 +62,4 @@ let diff driver_mode =
checkout Current ; checkout Current ;
let previous_report = Some (save_report Previous) in let previous_report = Some (save_report Previous) in
(* compute differential *) (* compute differential *)
ReportDiff.reportdiff ~current_report ~previous_report ; (* TODO(t15553258) report new bugs! *) ReportDiff.reportdiff ~current_report ~previous_report ; Driver.run_epilogue driver_mode ; ()
()

@ -547,6 +547,7 @@ let run_epilogue driver_mode =
StatsAggregator.generate_files () ; StatsAggregator.generate_files () ;
if Config.equal_analyzer Config.analyzer Config.Crashcontext then if Config.equal_analyzer Config.analyzer Config.Crashcontext then
Crashcontext.crashcontext_epilogue ~in_buck_mode ; Crashcontext.crashcontext_epilogue ~in_buck_mode ;
if Config.fail_on_bug then fail_on_issue_epilogue () ) ; if CLOpt.(equal_command Run) Config.command && Config.fail_on_bug then
fail_on_issue_epilogue () ) ;
if Config.buck_cache_mode then clean_results_dir () ; if Config.buck_cache_mode then clean_results_dir () ;
() ()

@ -52,7 +52,7 @@ test: print
$(QUIET)$(call check_no_diff,preexisting.exp,preexisting.exp.test) $(QUIET)$(call check_no_diff,preexisting.exp,preexisting.exp.test)
.PHONY: replace .PHONY: replace
replace: $(EXPECTED_TEST_OUTPUT) replace: introduced.exp.test
$(COPY) introduced.exp.test introduced.exp $(COPY) introduced.exp.test introduced.exp
$(COPY) fixed.exp.test fixed.exp $(COPY) fixed.exp.test fixed.exp
$(COPY) preexisting.exp.test preexisting.exp $(COPY) preexisting.exp.test preexisting.exp

Loading…
Cancel
Save