[infer] make sure we never swallow the failures when analyzing the models

Summary: Because making a diff which breaks the tests because it silently fails to create the right posts for the models is notoriously hard to debug

Reviewed By: sblackshear

Differential Revision: D5471611

fbshipit-source-id: ef04539
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 9246d1357c
commit fd4fbe163c

@ -16,7 +16,7 @@ all: install
$(INFER_RESULTS): $(C_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(INFER_RESULTS): $(C_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
# make clean in src/ to recompile all the models # make clean in src/ to recompile all the models
$(QUIET)$(call silent_on_success,Building C models,\ $(QUIET)$(call silent_on_success,Building C models,\
$(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
$(C_MODELS_FILE): $(INFER_RESULTS) $(C_MODELS_FILE): $(INFER_RESULTS)
$(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR) $(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR)

@ -18,7 +18,7 @@ all: install
$(INFER_RESULTS): $(MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(INFER_RESULTS): $(MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
# make clean in src/ to recompile all the models # make clean in src/ to recompile all the models
$(QUIET)$(call silent_on_success,Building C++ models,\ $(QUIET)$(call silent_on_success,Building C++ models,\
$(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
$(CPP_MODELS_FILE): $(INFER_RESULTS) $(CPP_MODELS_FILE): $(INFER_RESULTS)
$(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR) $(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR)

@ -16,7 +16,7 @@ all: install
$(INFER_RESULTS): $(OBJC_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(INFER_RESULTS): $(OBJC_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
# make clean in src/ to recompile all the models # make clean in src/ to recompile all the models
$(QUIET)$(call silent_on_success,Building Objective-C models,\ $(QUIET)$(call silent_on_success,Building Objective-C models,\
$(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
$(OBJC_MODELS_FILE): $(INFER_RESULTS) $(OBJC_MODELS_FILE): $(INFER_RESULTS)
$(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR) $(QUIET)$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR)

@ -817,6 +817,7 @@ and ( bo_debug
, frontend_tests , frontend_tests
, keep_going , keep_going
, linters_developer_mode , linters_developer_mode
, models_mode
, only_cheap_debug , only_cheap_debug
, print_buckets , print_buckets
, print_logs , print_logs
@ -919,6 +920,9 @@ and ( bo_debug
~in_help:CLOpt.([(Capture, manual_clang)]) ~in_help:CLOpt.([(Capture, manual_clang)])
"Save filename.ext.test.dot with the cfg in dotty format for frontend tests (also sets $(b,--print-types))" "Save filename.ext.test.dot with the cfg in dotty format for frontend tests (also sets $(b,--print-types))"
[print_types] [] [print_types] []
and models_mode =
CLOpt.mk_bool_group ~long:"models-mode" "Mode for analyzing the models" []
[failures_allowed; keep_going]
and print_logs = and print_logs =
CLOpt.mk_bool ~long:"print-logs" CLOpt.mk_bool ~long:"print-logs"
~in_help: ~in_help:
@ -955,6 +959,7 @@ and ( bo_debug
, frontend_tests , frontend_tests
, keep_going , keep_going
, linters_developer_mode , linters_developer_mode
, models_mode
, only_cheap_debug , only_cheap_debug
, print_buckets , print_buckets
, print_logs , print_logs
@ -1230,10 +1235,6 @@ and ml_buckets =
|} |}
~symbols:ml_bucket_symbols ~eq:PVariant.( = ) ~symbols:ml_bucket_symbols ~eq:PVariant.( = )
and models_mode =
CLOpt.mk_bool ~deprecated:["models_mode"; "-models_mode"] ~long:"models-mode"
"Mode for analyzing the models"
and modified_targets = and modified_targets =
CLOpt.mk_path_opt ~deprecated:["modified_targets"] ~long:"modified-targets" ~meta:"file" CLOpt.mk_path_opt ~deprecated:["modified_targets"] ~long:"modified-targets" ~meta:"file"
"Read the file of Buck targets modified since the last analysis" "Read the file of Buck targets modified since the last analysis"

Loading…
Cancel
Save