From bf11a2715853afac1c941620017dd880672f5162 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 25 Jul 2017 18:00:00 -0700 Subject: [PATCH] [infer] merge --failures-allowed and --keep-going Summary: The `--failures-allowed` was doing for the Clang frontend what `--keep-doing` was doing for the backend. This revision merges the two options to simplify the Infer CLI and our tests. Reviewed By: jvillard Differential Revision: D5474347 fbshipit-source-id: 09bcea4 --- infer/src/base/Config.ml | 14 +++----------- infer/src/base/Config.mli | 2 -- infer/src/clang/Capture.ml | 2 +- infer/src/clang/cFrontend_decl.ml | 2 +- infer/tests/build_systems/assembly/Makefile | 2 +- infer/tests/build_systems/buck-clang-db/Makefile | 2 +- infer/tests/build_systems/buck_flavors/Makefile | 2 +- .../buck_flavors_deterministic/Makefile | 2 +- infer/tests/build_systems/ck_imports/Makefile | 2 +- .../build_systems/clang_compilation_db/Makefile | 2 +- .../clang_compilation_db_escaped/Makefile | 2 +- .../clang_compilation_db_relpath/Makefile | 2 +- .../build_systems/clang_multiple_files/Makefile | 2 +- .../tests/build_systems/clang_translation/Makefile | 2 +- .../tests/build_systems/clang_unknown_ext/Makefile | 2 +- .../tests/build_systems/clang_with_E_flag/Makefile | 2 +- .../build_systems/clang_with_MD_flag/Makefile | 2 +- .../tests/build_systems/clang_with_M_flag/Makefile | 2 +- infer/tests/build_systems/cmake/Makefile | 2 +- infer/tests/build_systems/inferconfig/Makefile | 2 +- infer/tests/build_systems/preprocessed/Makefile | 2 +- .../tests/build_systems/project_root_rel/Makefile | 2 +- .../build_systems/run_hidden_linters/Makefile | 2 +- infer/tests/codetoanalyze/c/bufferoverrun/Makefile | 2 +- infer/tests/codetoanalyze/c/errors/Makefile | 2 +- infer/tests/codetoanalyze/c/frontend/Makefile | 2 +- .../tests/codetoanalyze/cpp/bufferoverrun/Makefile | 2 +- infer/tests/codetoanalyze/cpp/errors/Makefile | 2 +- infer/tests/codetoanalyze/cpp/frontend/Makefile | 2 +- infer/tests/codetoanalyze/cpp/liveness/Makefile | 2 +- infer/tests/codetoanalyze/cpp/quandary/Makefile | 2 +- infer/tests/codetoanalyze/cpp/siof/Makefile | 2 +- .../tests/codetoanalyze/cpp/threadsafety/Makefile | 2 +- infer/tests/codetoanalyze/objc/errors/Makefile | 2 +- infer/tests/codetoanalyze/objc/ioslints/Makefile | 2 +- .../codetoanalyze/objc/linters-def-folder/Makefile | 2 +- .../objc/linters-for-test-only/Makefile | 2 +- infer/tests/codetoanalyze/objc/linters/Makefile | 2 +- infer/tests/codetoanalyze/objc/quandary/Makefile | 2 +- infer/tests/codetoanalyze/objcpp/frontend/Makefile | 2 +- infer/tests/codetoanalyze/objcpp/linters/Makefile | 2 +- 41 files changed, 42 insertions(+), 52 deletions(-) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index ca1c6fb23..da3ddbbf0 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -804,7 +804,6 @@ and ( bo_debug , debug_level_capture , debug_level_linters , default_linters - , failures_allowed , filtering , frontend_tests , keep_going @@ -842,9 +841,6 @@ and ( bo_debug CLOpt.mk_bool ~long:"developer-mode" ~default:(Option.value_map ~default:false ~f:CLOpt.(equal_command Report) initial_command) "Show internal exceptions" - and failures_allowed = - CLOpt.mk_bool ~deprecated_no:["-no_failures_allowed"] ~long:"failures-allowed" ~default:true - "Fail if at least one of the translations fails (clang only)" and filtering = CLOpt.mk_bool ~deprecated_no:["nf"] ~long:"filtering" ~short:'f' ~default:true ~in_help:CLOpt.([(Report, manual_generic)]) @@ -857,7 +853,7 @@ and ( bo_debug and print_types = CLOpt.mk_bool ~long:"print-types" ~default:false "Print types in symbolic heaps" and keep_going = - CLOpt.mk_bool ~long:"keep-going" + CLOpt.mk_bool ~deprecated_no:["-no-failures-allowed"] ~long:"keep-going" ~in_help:CLOpt.([(Analyze, manual_generic)]) ~default:true "Keep going when the analysis encounters a failure" and reports_include_ml_loc = @@ -913,8 +909,7 @@ and ( bo_debug "Save filename.ext.test.dot with the cfg in dotty format for frontend tests (also sets $(b,--print-types))" [print_types] [] and models_mode = - CLOpt.mk_bool_group ~long:"models-mode" "Mode for analyzing the models" [] - [failures_allowed; keep_going] + CLOpt.mk_bool_group ~long:"models-mode" "Mode for analyzing the models" [] [keep_going] and print_logs = CLOpt.mk_bool ~long:"print-logs" ~in_help: @@ -936,7 +931,7 @@ and ( bo_debug ~f:(fun debug -> debug_level_linters := if debug then 2 else 0 ; debug) - [debug; developer_mode] [failures_allowed; default_linters] + [debug; developer_mode] [default_linters; keep_going] in ( bo_debug , developer_mode @@ -946,7 +941,6 @@ and ( bo_debug , debug_level_capture , debug_level_linters , default_linters - , failures_allowed , filtering , frontend_tests , keep_going @@ -1908,8 +1902,6 @@ and eradicate_verbose = !eradicate_verbose and fail_on_bug = !fail_on_bug -and failures_allowed = !failures_allowed - and fcp_apple_clang = !fcp_apple_clang and fcp_syntax_only = !fcp_syntax_only diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 5d1ee14de..4a8f350b8 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -380,8 +380,6 @@ val eradicate_verbose : bool val fail_on_bug : bool -val failures_allowed : bool - val fcp_apple_clang : string option val fcp_syntax_only : bool diff --git a/infer/src/clang/Capture.ml b/infer/src/clang/Capture.ml index 56ed53999..e2ba5bd84 100644 --- a/infer/src/clang/Capture.ml +++ b/infer/src/clang/Capture.ml @@ -104,7 +104,7 @@ let run_clang_frontend ast_source = let run_and_validate_clang_frontend ast_source = try run_clang_frontend ast_source - with exc -> if not Config.failures_allowed then raise exc + with exc -> if not Config.keep_going then raise exc let run_clang clang_command read = let exit_with_error exit_code = diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index 963365c38..ba063d905 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -56,7 +56,7 @@ module CFrontend_decl_funct (T : CModule_type.CTranslation) : CModule_type.CFron | CTrans_utils.TemplatedCodeException _ -> L.internal_error "Fatal error: frontend doesn't support translation of templated code@\n" ; handle_translation_failure () - | Assert_failure (file, line, column) when Config.failures_allowed + | Assert_failure (file, line, column) when Config.keep_going -> L.internal_error "Fatal error: exception Assert_failure(%s, %d, %d)@\n%!" file line column ; handle_translation_failure () diff --git a/infer/tests/build_systems/assembly/Makefile b/infer/tests/build_systems/assembly/Makefile index 95d9c8968..dee7c756b 100644 --- a/infer/tests/build_systems/assembly/Makefile +++ b/infer/tests/build_systems/assembly/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/buck-clang-db/Makefile b/infer/tests/build_systems/buck-clang-db/Makefile index 6ee40e821..2e974a7f0 100644 --- a/infer/tests/build_systems/buck-clang-db/Makefile +++ b/infer/tests/build_systems/buck-clang-db/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. SOURCE_DIR = ../codetoanalyze ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR) --no-keep-going SOURCES = $(wildcard $(SOURCE_DIR)/*.cpp $(SOURCE_DIR)/*.h) OBJECTS = '$(SOURCE_DIR)/buck-out/gen/clang_compilation_database/__Hel lo\#compilation-database,x86_64.json' INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/buck_flavors/Makefile b/infer/tests/build_systems/buck_flavors/Makefile index c74980fd1..1927a7575 100644 --- a/infer/tests/build_systems/buck_flavors/Makefile +++ b/infer/tests/build_systems/buck_flavors/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer BUCK_TARGET = //src:hello SOURCES = $(wildcard src/hello.c) OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests CLEAN_EXTRA = buck-out diff --git a/infer/tests/build_systems/buck_flavors_deterministic/Makefile b/infer/tests/build_systems/buck_flavors_deterministic/Makefile index 5893e306c..93dfdb302 100644 --- a/infer/tests/build_systems/buck_flavors_deterministic/Makefile +++ b/infer/tests/build_systems/buck_flavors_deterministic/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer BUCK_TARGET = //src:hello SOURCES = $(wildcard src/hello.c) OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests CLEAN_EXTRA = buck-out capture_hash-1.sha capture_hash-2.sha diff --git a/infer/tests/build_systems/ck_imports/Makefile b/infer/tests/build_systems/ck_imports/Makefile index 634dab4d1..89006bcd2 100644 --- a/infer/tests/build_systems/ck_imports/Makefile +++ b/infer/tests/build_systems/ck_imports/Makefile @@ -12,7 +12,7 @@ ANALYZER = linters CODETOANALYZE_DIR = ../codetoanalyze/componentkit CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks -INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR) --no-failures-allowed +INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = $(CODETOANALYZE_DIR)/TestIgnoreImports.mm diff --git a/infer/tests/build_systems/clang_compilation_db/Makefile b/infer/tests/build_systems/clang_compilation_db/Makefile index 89dc4b761..af56d05b9 100644 --- a/infer/tests/build_systems/clang_compilation_db/Makefile +++ b/infer/tests/build_systems/clang_compilation_db/Makefile @@ -12,7 +12,7 @@ CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-keep-going SOURCES = $(CMAKE_DIR)/hello.cpp OBJECTS = $(CMAKE_BUILD_DIR)/compile_commands.json INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/clang_compilation_db_escaped/Makefile b/infer/tests/build_systems/clang_compilation_db_escaped/Makefile index f25ec1684..4b690b93f 100644 --- a/infer/tests/build_systems/clang_compilation_db_escaped/Makefile +++ b/infer/tests/build_systems/clang_compilation_db_escaped/Makefile @@ -8,7 +8,7 @@ TESTS_DIR = ../.. ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --no-keep-going SOURCES = ../codetoanalyze/path\ with\ spaces/hel\ lo.c OBJECTS = $(SOURCES:.c=.o) CLEAN_EXTRA = compile_commands.json diff --git a/infer/tests/build_systems/clang_compilation_db_relpath/Makefile b/infer/tests/build_systems/clang_compilation_db_relpath/Makefile index a2bf12126..42500b05b 100644 --- a/infer/tests/build_systems/clang_compilation_db_relpath/Makefile +++ b/infer/tests/build_systems/clang_compilation_db_relpath/Makefile @@ -8,7 +8,7 @@ TESTS_DIR = ../.. ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --no-keep-going SOURCES = \ ../codetoanalyze/hello.c ../codetoanalyze/hello2.c ../codetoanalyze/hello3.c \ ../codetoanalyze/path\ with\ spaces/hel\ lo.c diff --git a/infer/tests/build_systems/clang_multiple_files/Makefile b/infer/tests/build_systems/clang_multiple_files/Makefile index c7ff36034..2f7bac048 100644 --- a/infer/tests/build_systems/clang_multiple_files/Makefile +++ b/infer/tests/build_systems/clang_multiple_files/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c ../codetoanalyze/hello2.c diff --git a/infer/tests/build_systems/clang_translation/Makefile b/infer/tests/build_systems/clang_translation/Makefile index 7983c3393..4096a78fd 100644 --- a/infer/tests/build_systems/clang_translation/Makefile +++ b/infer/tests/build_systems/clang_translation/Makefile @@ -24,7 +24,7 @@ CLEAN_EXTRA = $(DOT_FILES) $(foreach source,$(SOURCES),infer-out-$(basename $(no include $(TESTS_DIR)/clang-frontend.make -INFER_OPTIONS = capture --frontend-tests --skip-translation-headers exclude_dir --no-failures-allowed +INFER_OPTIONS = capture --frontend-tests --skip-translation-headers exclude_dir --no-keep-going capture: $(DOT_FILES) diff --git a/infer/tests/build_systems/clang_unknown_ext/Makefile b/infer/tests/build_systems/clang_unknown_ext/Makefile index 061a22935..1ce459f74 100644 --- a/infer/tests/build_systems/clang_unknown_ext/Makefile +++ b/infer/tests/build_systems/clang_unknown_ext/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -x c -c -INFER_OPTIONS = --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.unknown_ext diff --git a/infer/tests/build_systems/clang_with_E_flag/Makefile b/infer/tests/build_systems/clang_with_E_flag/Makefile index e513898de..3fc3af039 100644 --- a/infer/tests/build_systems/clang_with_E_flag/Makefile +++ b/infer/tests/build_systems/clang_with_E_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -E -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/clang_with_MD_flag/Makefile b/infer/tests/build_systems/clang_with_MD_flag/Makefile index 0dcfcb1a3..0b66146a7 100644 --- a/infer/tests/build_systems/clang_with_MD_flag/Makefile +++ b/infer/tests/build_systems/clang_with_MD_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -MD -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/clang_with_M_flag/Makefile b/infer/tests/build_systems/clang_with_M_flag/Makefile index 5adb826bc..81f9fdeac 100644 --- a/infer/tests/build_systems/clang_with_M_flag/Makefile +++ b/infer/tests/build_systems/clang_with_M_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -M -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/cmake/Makefile b/infer/tests/build_systems/cmake/Makefile index cd9f8d06c..6c8208834 100644 --- a/infer/tests/build_systems/cmake/Makefile +++ b/infer/tests/build_systems/cmake/Makefile @@ -13,7 +13,7 @@ CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) -INFER_OPTIONS = --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --project-root $(TESTS_DIR) --no-keep-going SOURCES = $(CMAKE_DIR)/hello.c OBJECTS = $(CMAKE_BUILD_DIR)/CMakeFiles/Hello.dir/hello.c.o INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/inferconfig/Makefile b/infer/tests/build_systems/inferconfig/Makefile index 5754ef580..01a1ff3b6 100644 --- a/infer/tests/build_systems/inferconfig/Makefile +++ b/infer/tests/build_systems/inferconfig/Makefile @@ -12,7 +12,7 @@ CMAKE_BUILD_DIR = $(CURDIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-keep-going SOURCES = $(CMAKE_DIR)/hello.cpp OBJECTS = $(CMAKE_BUILD_DIR)/compile_commands.json INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/preprocessed/Makefile b/infer/tests/build_systems/preprocessed/Makefile index 9f9b6c63c..6bd7f571b 100644 --- a/infer/tests/build_systems/preprocessed/Makefile +++ b/infer/tests/build_systems/preprocessed/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/project_root_rel/Makefile b/infer/tests/build_systems/project_root_rel/Makefile index 675045d12..d2711bd70 100644 --- a/infer/tests/build_systems/project_root_rel/Makefile +++ b/infer/tests/build_systems/project_root_rel/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/run_hidden_linters/Makefile b/infer/tests/build_systems/run_hidden_linters/Makefile index f5603a905..568f77a2d 100644 --- a/infer/tests/build_systems/run_hidden_linters/Makefile +++ b/infer/tests/build_systems/run_hidden_linters/Makefile @@ -15,7 +15,7 @@ ANALYZER = linters CODETOANALYZE_DIR = ../codetoanalyze/componentkit CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks -INFER_OPTIONS = --compute-analytics --project-root $(CODETOANALYZE_DIR) --no-failures-allowed +INFER_OPTIONS = --compute-analytics --project-root $(CODETOANALYZE_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm diff --git a/infer/tests/codetoanalyze/c/bufferoverrun/Makefile b/infer/tests/codetoanalyze/c/bufferoverrun/Makefile index 33f9f6477..de229ddbb 100644 --- a/infer/tests/codetoanalyze/c/bufferoverrun/Makefile +++ b/infer/tests/codetoanalyze/c/bufferoverrun/Makefile @@ -12,7 +12,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers CLANG_OPTIONS = -c -INFER_OPTIONS = -F --project-root $(TESTS_DIR) --no-failures-allowed --no-liveness --bufferoverrun +INFER_OPTIONS = -F --project-root $(TESTS_DIR) --no-keep-going --no-liveness --bufferoverrun INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.c) diff --git a/infer/tests/codetoanalyze/c/errors/Makefile b/infer/tests/codetoanalyze/c/errors/Makefile index e301f8469..de892532a 100644 --- a/infer/tests/codetoanalyze/c/errors/Makefile +++ b/infer/tests/codetoanalyze/c/errors/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --report-custom-error --developer-mode --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going # we need to disable traces in C tests because assertions/assertion_failure.c has different traces # on Linux and OSX because of different implementations of assert() on each platform INFERPRINT_OPTIONS = --issues-fields "file,procedure,line_offset,bug_type" --issues-tests diff --git a/infer/tests/codetoanalyze/c/frontend/Makefile b/infer/tests/codetoanalyze/c/frontend/Makefile index faa0d4400..bbeaac9fa 100644 --- a/infer/tests/codetoanalyze/c/frontend/Makefile +++ b/infer/tests/codetoanalyze/c/frontend/Makefile @@ -8,7 +8,7 @@ TESTS_DIR=../../.. CLANG_OPTIONS = -c -INFER_OPTIONS = --no-failures-allowed +INFER_OPTIONS = --no-keep-going SOURCES = \ $(wildcard */*.c) \ diff --git a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile index 92b63476e..a1f765046 100644 --- a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile +++ b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile @@ -11,7 +11,7 @@ ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c INFER_OPTIONS = --bufferoverrun --ml-buckets cpp --no-filtering --debug-exceptions \ - --project-root $(TESTS_DIR) --no-failures-allowed --no-liveness + --project-root $(TESTS_DIR) --no-keep-going --no-liveness INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/errors/Makefile b/infer/tests/codetoanalyze/cpp/errors/Makefile index 42e04c704..be13a34fd 100644 --- a/infer/tests/codetoanalyze/cpp/errors/Makefile +++ b/infer/tests/codetoanalyze/cpp/errors/Makefile @@ -11,7 +11,7 @@ ANALYZER = infer CLANG_OPTIONS = -x c++ -std=c++14 -isystem$(ROOT_DIR) -c INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ - --no-failures-allowed --pmd-xml --report-custom-error + --no-keep-going --pmd-xml --report-custom-error INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/frontend/Makefile b/infer/tests/codetoanalyze/cpp/frontend/Makefile index 748c56a24..9eaf655bd 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/Makefile +++ b/infer/tests/codetoanalyze/cpp/frontend/Makefile @@ -11,7 +11,7 @@ TESTS_DIR=../../.. CLANG_OPTIONS = \ -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ \ -x c++ -std=c++11 -c -INFER_OPTIONS = --headers --no-failures-allowed +INFER_OPTIONS = --headers --no-keep-going SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/liveness/Makefile b/infer/tests/codetoanalyze/cpp/liveness/Makefile index 3943f3d6b..b0f325e6b 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/Makefile +++ b/infer/tests/codetoanalyze/cpp/liveness/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/quandary/Makefile b/infer/tests/codetoanalyze/cpp/quandary/Makefile index ff6f6776e..efda022ab 100644 --- a/infer/tests/codetoanalyze/cpp/quandary/Makefile +++ b/infer/tests/codetoanalyze/cpp/quandary/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --quandary --passthroughs --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --quandary --passthroughs --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/siof/Makefile b/infer/tests/codetoanalyze/cpp/siof/Makefile index 2da3a4b73..a3fecdff8 100644 --- a/infer/tests/codetoanalyze/cpp/siof/Makefile +++ b/infer/tests/codetoanalyze/cpp/siof/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --siof --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --siof --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/threadsafety/Makefile b/infer/tests/codetoanalyze/cpp/threadsafety/Makefile index f4740e465..94d94a175 100644 --- a/infer/tests/codetoanalyze/cpp/threadsafety/Makefile +++ b/infer/tests/codetoanalyze/cpp/threadsafety/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --threadsafety --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --threadsafety --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFER_OPTIONS += --debug INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/codetoanalyze/objc/errors/Makefile b/infer/tests/codetoanalyze/objc/errors/Makefile index f5da36ed2..ec97c1900 100644 --- a/infer/tests/codetoanalyze/objc/errors/Makefile +++ b/infer/tests/codetoanalyze/objc/errors/Makefile @@ -18,7 +18,7 @@ CLANG_OPTIONS = -x objective-c \ CLEAN_EXTRA = infer-out-arc infer-out-all infer-out-all infer-out-arc \ issues.exp.test.all issues.exp.test.arc issues.exp.test.default -INFER_OPTIONS = --dump-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --dump-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES_DEFAULT = \ diff --git a/infer/tests/codetoanalyze/objc/ioslints/Makefile b/infer/tests/codetoanalyze/objc/ioslints/Makefile index 60765f306..64b6be192 100644 --- a/infer/tests/codetoanalyze/objc/ioslints/Makefile +++ b/infer/tests/codetoanalyze/objc/ioslints/Makefile @@ -19,7 +19,7 @@ ANALYZER = linters INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ --iphoneos-target-sdk-version 8.0 \ --iphoneos-target-sdk-version-skip-path "codetoanalyze/objc/ioslints/filter_out_unavailable_api\.m" \ ---no-failures-allowed +--no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile b/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile index 9a9385b9e..317693f02 100644 --- a/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile +++ b/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -c -INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = file.m diff --git a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile index 334e80131..3347b2c7b 100644 --- a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile +++ b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -fobjc-arc -c -INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objc/linters/Makefile b/infer/tests/codetoanalyze/objc/linters/Makefile index d17d370ef..27a880876 100644 --- a/infer/tests/codetoanalyze/objc/linters/Makefile +++ b/infer/tests/codetoanalyze/objc/linters/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -x objective-c -fobjc-arc -c -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objc/quandary/Makefile b/infer/tests/codetoanalyze/objc/quandary/Makefile index 8dd45e197..c98a6cd81 100644 --- a/infer/tests/codetoanalyze/objc/quandary/Makefile +++ b/infer/tests/codetoanalyze/objc/quandary/Makefile @@ -16,7 +16,7 @@ CLANG_OPTIONS = -x objective-c \ -mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \ ANALYZER = quandary -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0 --no-failures-allowed +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0 --no-keep-going INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objcpp/frontend/Makefile b/infer/tests/codetoanalyze/objcpp/frontend/Makefile index e083555b9..8e0c9c84a 100644 --- a/infer/tests/codetoanalyze/objcpp/frontend/Makefile +++ b/infer/tests/codetoanalyze/objcpp/frontend/Makefile @@ -15,7 +15,7 @@ CLANG_OPTIONS = -x objective-c++ -std=c++11 \ -isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \ -mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \ -INFER_OPTIONS = --no-failures-allowed +INFER_OPTIONS = --no-keep-going SOURCES = \ $(wildcard */*.mm) \ diff --git a/infer/tests/codetoanalyze/objcpp/linters/Makefile b/infer/tests/codetoanalyze/objcpp/linters/Makefile index 3507a5068..eff1f903a 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/Makefile +++ b/infer/tests/codetoanalyze/objcpp/linters/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-failures-allowed \ +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going \ --enable-checks GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL INFERPRINT_OPTIONS = --issues-tests