[kill -a][1/4] stop using `-a foo` in the infer repo

Summary:
Goal of the stack: deprecate the `--analyzer` option in favour of turning
individual features on and off. This option is a mess: some of the options are
now subcommands (compile, capture), others are aliases (infer and checkers),
and they can all be replicated using some straightforward combination of other
options.

This diff: stop using `--analyzer` in tests. It's mostly `checkers` everywhere,
which is already the default. `linters` becomes `--no-capture --linters-only`.
`infer` is supposed to be `checkers` already. `crashcontext` is
`--crashcontext-only`.

Reviewed By: mbouaziz

Differential Revision: D9942689

fbshipit-source-id: 048281761
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent c257f68226
commit a29e769b61

@ -30,7 +30,7 @@ $(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(MODELS_OUT) $(QUIET)$(MKDIR_P) $(MODELS_OUT)
$(QUIET)rm -f $(JAVA_MODELS_JAR) $(QUIET)rm -f $(JAVA_MODELS_JAR)
$(QUIET)$(call silent_on_success,Building Java models,\ $(QUIET)$(call silent_on_success,Building Java models,\
$(INFER_BIN) -a checkers --biabduction-only --results-dir $(INFER_RESULTS_DIR) --models-mode -- \ $(INFER_BIN) --biabduction-only --results-dir $(INFER_RESULTS_DIR) --models-mode -- \
$(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) \ $(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) \
$(JAVA_SOURCES) -source 7 -target 7) $(JAVA_SOURCES) -source 7 -target 7)

@ -132,7 +132,7 @@ void closeInCatchBad() {
``` ```
(b) Try running on real code! The instructions [here](http://fm.csl.sri.com/SSFT17/infer-instr.html) have several suggestions for open-source Android apps to point your analysis at. Try `./gradlew assembleDebug -x test` first to make sure everything builds correctly without Infer (if not, you are probably missing some dependencies--the error messages should guide you). Once that's working, try (b) Try running on real code! The instructions [here](http://fm.csl.sri.com/SSFT17/infer-instr.html) have several suggestions for open-source Android apps to point your analysis at. Try `./gradlew assembleDebug -x test` first to make sure everything builds correctly without Infer (if not, you are probably missing some dependencies--the error messages should guide you). Once that's working, try
`./gradlew clean; infer -a checkers --resource-leak-only -- ./gradlew assembleDebug -x test`. `./gradlew clean; infer run --resource-leak-only -- ./gradlew assembleDebug -x test`.
- Found a real bug? Bonus points! Send a pull request to fix it! Very frequently, the best fix is to use try-with-resources. - Found a real bug? Bonus points! Send a pull request to fix it! Very frequently, the best fix is to use try-with-resources.
- Found a false positive in your analysis? Try re-running Infer with `--debug` and see if you can narrow down the root cause/fix it. - Found a false positive in your analysis? Try re-running Infer with `--debug` and see if you can narrow down the root cause/fix it.
- How does your analysis compare to Infer's production resource leak analysis? Run with `infer -- <gradle command>` to see if your analysis finds bugs that Infer misses, or vice versa. - How does your analysis compare to Infer's production resource leak analysis? Run with `infer -- <gradle command>` to see if your analysis finds bugs that Infer misses, or vice versa.

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
SOURCES = $(wildcard src/infer/*.java) SOURCES = $(wildcard src/infer/*.java)
OBJECTS = $(patsubst %.java,ant_out/%.class,$(SOURCES)) OBJECTS = $(patsubst %.java,ant_out/%.class,$(SOURCES))
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -18,7 +17,7 @@ $(OBJECTS): $(SOURCES)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES) infer-out/report.json: $(JAVA_DEPS) $(SOURCES)
$(QUIET)$(call silent_on_success,Testing ant integration,\ $(QUIET)$(call silent_on_success,Testing ant integration,\
$(INFER_BIN) -a $(ANALYZER) --project-root $(TESTS_DIR) -- $(ANT)) $(INFER_BIN) --project-root $(TESTS_DIR) -- $(ANT))
clean: clean:
$(ANT) clean $(ANT) clean

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --Xclang -U --Xclang __SSE2__ INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --Xclang -U --Xclang __SSE2__
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -7,7 +7,6 @@ TESTS_DIR = ../..
SOURCE_DIR = ../codetoanalyze SOURCE_DIR = ../codetoanalyze
ANALYZER = checkers
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR) INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR)
SOURCES = $(wildcard $(SOURCE_DIR)/*.cpp $(SOURCE_DIR)/*.h) SOURCES = $(wildcard $(SOURCE_DIR)/*.cpp $(SOURCE_DIR)/*.h)
OBJECTS = '$(SOURCE_DIR)/buck-out/gen/clang_compilation_database/__Hel lo\#compilation-database,x86_64.json' OBJECTS = '$(SOURCE_DIR)/buck-out/gen/clang_compilation_database/__Hel lo\#compilation-database,x86_64.json'
@ -19,6 +18,6 @@ include $(TESTS_DIR)/infer.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)cd $(SOURCE_DIR) && \ $(QUIET)cd $(SOURCE_DIR) && \
$(call silent_on_success,Testing Buck Clang compilation database integration,\ $(call silent_on_success,Testing Buck Clang compilation database integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(CURDIR)/$(@D) \ $(INFER_BIN) $(INFER_OPTIONS) -o $(CURDIR)/$(@D) \
--buck-compilation-database no-deps \ --buck-compilation-database no-deps \
-- $(BUCK) build --no-cache '//clang_compilation_database:Hel lo#default' @clang_compilation_database/buck_target_hello_test.txt) -- $(BUCK) build --no-cache '//clang_compilation_database:Hel lo#default' @clang_compilation_database/buck_target_hello_test.txt)

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //infer/tests/build_systems/genrule/module2:module2 BUCK_TARGET = //infer/tests/build_systems/genrule/module2:module2
SOURCES = $(wildcard $(TESTS_DIR)/codetoanalyze/java/infer/*.java) SOURCES = $(wildcard $(TESTS_DIR)/codetoanalyze/java/infer/*.java)
OBJECTS = $(ROOT_DIR)/buck-out/gen/infer/tests/build_systems/genrule/module2/lib__module2__output/module2.jar OBJECTS = $(ROOT_DIR)/buck-out/gen/infer/tests/build_systems/genrule/module2/lib__module2__output/module2.jar
@ -28,5 +27,5 @@ infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(REMOVE_DIR) buck-out && \ $(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck Java integration,\ $(call silent_on_success,Testing Buck Java integration,\
INFER_BIN=$(INFER_BIN) \ INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) $(INFER_OPTIONS) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ $(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --deep --no-cache $(BUCK_TARGET)) $(BUCK) build --deep --no-cache $(BUCK_TARGET))

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //infer/tests/build_systems/buck_cross_module/module2:module2 BUCK_TARGET = //infer/tests/build_systems/buck_cross_module/module2:module2
INFERPRINT_OPTIONS = --project-root $(ROOT_DIR) --issues-tests INFERPRINT_OPTIONS = --project-root $(ROOT_DIR) --issues-tests
CLEAN_EXTRA = $(ROOT_DIR)/buck-out CLEAN_EXTRA = $(ROOT_DIR)/buck-out
@ -25,5 +24,5 @@ infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(REMOVE_DIR) buck-out && \ $(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck Java cross module integration,\ $(call silent_on_success,Testing Buck Java cross module integration,\
INFER_BIN=$(INFER_BIN) \ INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ $(INFER_BIN) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET)) $(BUCK) build --no-cache $(BUCK_TARGET))

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //src:hello @buck_target.txt BUCK_TARGET = //src:hello @buck_target.txt
SOURCES = $(wildcard src/*.c) $(wildcard src/subtarget1/*.c) $(wildcard src/subtarget2/*.c) SOURCES = $(wildcard src/*.c) $(wildcard src/subtarget1/*.c) $(wildcard src/subtarget2/*.c)
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //src:hello BUCK_TARGET = //src:hello
SOURCES = $(wildcard src/hello.c) SOURCES = $(wildcard src/hello.c)
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //src:hello BUCK_TARGET = //src:hello
SOURCES = src/hello.c src/hello2.c SOURCES = src/hello.c src/hello2.c
OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
TARGET = //src:target TARGET = //src:target
SOURCES = src/UsingJavacJar.java SOURCES = src/UsingJavacJar.java
OBJECTS = buck-out/gen/src/lib__target__output/target.jar OBJECTS = buck-out/gen/src/lib__target__output/target.jar

@ -5,12 +5,10 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = linters
CODETOANALYZE_DIR = ../codetoanalyze/componentkit CODETOANALYZE_DIR = ../codetoanalyze/componentkit
CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks
INFER_OPTIONS = --no-filtering --compute-analytics --project-root $(CODETOANALYZE_DIR) INFER_OPTIONS = --no-capture --linters-only --no-filtering --compute-analytics --project-root $(CODETOANALYZE_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm

@ -5,12 +5,10 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = linters
CODETOANALYZE_DIR = ../codetoanalyze/componentkit CODETOANALYZE_DIR = ../codetoanalyze/componentkit
CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks
INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR) INFER_OPTIONS = --no-capture --linters-only --no-filtering --project-root $(CODETOANALYZE_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(CODETOANALYZE_DIR)/TestIgnoreImports.mm SOURCES = $(CODETOANALYZE_DIR)/TestIgnoreImports.mm

@ -8,7 +8,6 @@ TESTS_DIR = ../..
CMAKE_DIR = ../codetoanalyze/clang_compilation_database CMAKE_DIR = ../codetoanalyze/clang_compilation_database
CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build_infer CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build_infer
ANALYZER = checkers
CLEAN_EXTRA = $(CMAKE_BUILD_DIR) CLEAN_EXTRA = $(CMAKE_BUILD_DIR)
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR)
SOURCES = $(CMAKE_DIR)/hello.cpp SOURCES = $(CMAKE_DIR)/hello.cpp
@ -30,23 +29,23 @@ infer-out/report.json:
infer-out-with-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES) infer-out-with-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(QUIET)$(call silent_on_success,Testing Clang compilation database with index integration,\ $(QUIET)$(call silent_on_success,Testing Clang compilation database with index integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(@D) \ $(INFER_BIN) $(INFER_OPTIONS) -o $(@D) \
--changed-files-index $(CMAKE_DIR)/index.txt --compilation-database $<) --changed-files-index $(CMAKE_DIR)/index.txt --compilation-database $<)
infer-out-no-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES) infer-out-no-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(QUIET)$(call silent_on_success,Testing Clang compilation database integration,\ $(QUIET)$(call silent_on_success,Testing Clang compilation database integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(@D) --compilation-database $<) $(INFER_BIN) $(INFER_OPTIONS) -o $(@D) --compilation-database $<)
infer-out-reactive-capture/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES) infer-out-reactive-capture/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(QUIET)$(call silent_on_success,Testing Clang compilation database reactive capture integration,\ $(QUIET)$(call silent_on_success,Testing Clang compilation database reactive capture integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(@D) --reactive-capture \ $(INFER_BIN) $(INFER_OPTIONS) -o $(@D) --reactive-capture \
--changed-files-index $(CMAKE_DIR)/index.txt --compilation-database $<) --changed-files-index $(CMAKE_DIR)/index.txt --compilation-database $<)
issues.exp.test: infer-out-with-index/report.json infer-out-no-index/report.json infer-out-reactive-capture/report.json issues.exp.test: infer-out-with-index/report.json infer-out-no-index/report.json infer-out-reactive-capture/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.with-index \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.with-index \
-o infer-out-with-index --from-json-report infer-out-with-index/report.json -o infer-out-with-index --from-json-report infer-out-with-index/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.no-index \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.no-index \
-o infer-out-no-index --from-json-report infer-out-no-index/report.json -o infer-out-no-index --from-json-report infer-out-no-index/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.reactive-capture \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.reactive-capture \
-o infer-out-reactive-capture --from-json-report infer-out-reactive-capture/report.json -o infer-out-reactive-capture --from-json-report infer-out-reactive-capture/report.json
$(QUIET)cat $@.with-index $@.no-index $@.reactive-capture > $@ $(QUIET)cat $@.with-index $@.no-index $@.reactive-capture > $@

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
INFER_OPTIONS = --report-custom-error --developer-mode INFER_OPTIONS = --report-custom-error --developer-mode
SOURCES = ../codetoanalyze/path\ with\ spaces/hel\ lo.c SOURCES = ../codetoanalyze/path\ with\ spaces/hel\ lo.c
OBJECTS = $(SOURCES:.c=.o) OBJECTS = $(SOURCES:.c=.o)
@ -27,5 +26,5 @@ compile_commands.json: compile_commands.json.in
infer-out/report.json: compile_commands.json $(SOURCES) Makefile \ infer-out/report.json: compile_commands.json $(SOURCES) Makefile \
../codetoanalyze/path\ with\ spaces/hel\ lo.c $(CLANG_DEPS) ../codetoanalyze/path\ with\ spaces/hel\ lo.c $(CLANG_DEPS)
$(QUIET)$(call silent_on_success,Clang compilation database escaped integration,\ $(QUIET)$(call silent_on_success,Clang compilation database escaped integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \ $(INFER_BIN) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \
--compilation-database-escaped $<) --compilation-database-escaped $<)

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
INFER_OPTIONS = --report-custom-error --developer-mode INFER_OPTIONS = --report-custom-error --developer-mode
SOURCES = \ SOURCES = \
../codetoanalyze/hello.c ../codetoanalyze/hello2.c ../codetoanalyze/hello3.c \ ../codetoanalyze/hello.c ../codetoanalyze/hello2.c ../codetoanalyze/hello3.c \
@ -31,5 +30,5 @@ compile_commands.json: compile_commands.json.in
infer-out/report.json: compile_commands.json $(SOURCES) Makefile \ infer-out/report.json: compile_commands.json $(SOURCES) Makefile \
../codetoanalyze/path\ with\ spaces/hel\ lo.c $(CLANG_DEPS) ../codetoanalyze/path\ with\ spaces/hel\ lo.c $(CLANG_DEPS)
$(QUIET)$(call silent_on_success,Clang compilation database with relative paths integration,\ $(QUIET)$(call silent_on_success,Clang compilation database with relative paths integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \ $(INFER_BIN) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \
--compilation-database $<) --compilation-database $<)

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --project-root ../codetoanalyze INFER_OPTIONS = --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -x c -c CLANG_OPTIONS = -x c -c
INFER_OPTIONS = --project-root ../codetoanalyze INFER_OPTIONS = --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -E -c CLANG_OPTIONS = -E -c
INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -MD -c CLANG_OPTIONS = -MD -c
INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -M -c CLANG_OPTIONS = -M -c
INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
# The "-index-store-path <folder>" argument does not exist in Clang and it gets # The "-index-store-path <folder>" argument does not exist in Clang and it gets
# discarded without any error message. The problem is that its argument, # discarded without any error message. The problem is that its argument,
# a folder, is not discarded, and Clang considers it as a source file. This # a folder, is not discarded, and Clang considers it as a source file. This

@ -9,7 +9,6 @@ CMAKE_DIR = ../codetoanalyze/cmake
CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build
CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer
ANALYZER = checkers
CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR)
INFER_OPTIONS = --project-root $(TESTS_DIR) INFER_OPTIONS = --project-root $(TESTS_DIR)
SOURCES = $(CMAKE_DIR)/hello.c SOURCES = $(CMAKE_DIR)/hello.c
@ -35,6 +34,6 @@ infer-out/report.json: $(SOURCES) $(CMAKE_DIR)/CMakeLists.txt $(CLANG_DEPS)
$(call silent_on_success,Testing CMake integration: Generate Makefiles,\ $(call silent_on_success,Testing CMake integration: Generate Makefiles,\
$(INFER_BIN) compile $(INFER_OPTIONS) -- cmake ..) $(INFER_BIN) compile $(INFER_OPTIONS) -- cmake ..)
$(QUIET)$(call silent_on_success,Testing CMake integration: Run Makefiles,\ $(QUIET)$(call silent_on_success,Testing CMake integration: Run Makefiles,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -- $(MAKE) -C $(CMAKE_ANALYZE_DIR)) $(INFER_BIN) $(INFER_OPTIONS) -- $(MAKE) -C $(CMAKE_ANALYZE_DIR))
# cmake makes all paths absolute # cmake makes all paths absolute
$(QUIET)sed -i -e 's#$(abspath $(TESTS_DIR))/##g' $@ $(QUIET)sed -i -e 's#$(abspath $(TESTS_DIR))/##g' $@

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --project-root src --liveness INFER_OPTIONS = --project-root src --liveness
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -8,8 +8,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CODETOANALYZE_DIR = ../codetoanalyze CODETOANALYZE_DIR = ../codetoanalyze
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
@ -22,8 +20,8 @@ include $(TESTS_DIR)/clang.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 1/2,\ $(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 1/2,\
$(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello.c) $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello.c)
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)
$(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 2/2,\ $(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 2/2,\
$(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello2.c) $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello2.c)
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)

@ -7,8 +7,6 @@ TESTS_DIR = ../..
include $(TESTS_DIR)/base.make include $(TESTS_DIR)/base.make
ANALYZER = checkers
CODETOANALYZE_DIR = ../codetoanalyze CODETOANALYZE_DIR = ../codetoanalyze
CLANG_OPTIONS = -c CLANG_OPTIONS = -c

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = infer
BUCK_TARGET = //infer/tests/build_systems/genrule/module2:module2 BUCK_TARGET = //infer/tests/build_systems/genrule/module2:module2
INFER_TARGET = $(BUCK_TARGET)_infer INFER_TARGET = $(BUCK_TARGET)_infer
SOURCES = $(wildcard $(TESTS_DIR)/codetoanalyze/java/infer/*.java) SOURCES = $(wildcard $(TESTS_DIR)/codetoanalyze/java/infer/*.java)
@ -41,5 +40,5 @@ report.json: $(JSON_REPORT) $(MAKEFILE_LIST)
$(QUIET)sed -e 's#$(abspath $(TESTS_DIR))/##g' $< > $@ $(QUIET)sed -e 's#$(abspath $(TESTS_DIR))/##g' $< > $@
issues.exp.test$(TEST_SUFFIX): report.json $(INFER_BIN) issues.exp.test$(TEST_SUFFIX): report.json $(INFER_BIN)
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) \ $(QUIET)$(INFER_BIN) report -q \
$(INFERPRINT_OPTIONS) $@ --from-json-report $< $(INFERPRINT_OPTIONS) $@ --from-json-report $<

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
SOURCES_DIR = $(ROOT_DIR)/examples/java_hello SOURCES_DIR = $(ROOT_DIR)/examples/java_hello
SOURCES = $(wildcard $(SOURCES_DIR)/*.java) SOURCES = $(wildcard $(SOURCES_DIR)/*.java)
# no objects since we only run a mock gradle that cannot compile Java sources # no objects since we only run a mock gradle that cannot compile Java sources
@ -21,4 +20,4 @@ infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)PATH=$(CURDIR)/../mock:"$$PATH"; \ $(QUIET)PATH=$(CURDIR)/../mock:"$$PATH"; \
cd $(SOURCES_DIR) && \ cd $(SOURCES_DIR) && \
$(call silent_on_success,Testing gradle Java integration,\ $(call silent_on_success,Testing gradle Java integration,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- gradle build) $(INFER_BIN) --results-dir $(CURDIR)/infer-out -- gradle build)

@ -8,7 +8,6 @@ TESTS_DIR = ../..
CMAKE_DIR = $(CURDIR)/../codetoanalyze/clang_compilation_database CMAKE_DIR = $(CURDIR)/../codetoanalyze/clang_compilation_database
CMAKE_BUILD_DIR = $(CURDIR)/_build_infer CMAKE_BUILD_DIR = $(CURDIR)/_build_infer
ANALYZER = checkers
CLEAN_EXTRA = $(CMAKE_BUILD_DIR) CLEAN_EXTRA = $(CMAKE_BUILD_DIR)
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR)
SOURCES = $(CMAKE_DIR)/hello.cpp SOURCES = $(CMAKE_DIR)/hello.cpp
@ -29,5 +28,5 @@ infer-out/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(
# test that config/infer.conf is read and paths inside it are interpreted relative to its # test that config/infer.conf is read and paths inside it are interpreted relative to its
# location # location
$(QUIET)$(call silent_on_success,Testing Clang compilation database with index integration,\ $(QUIET)$(call silent_on_success,Testing Clang compilation database with index integration,\
INFERCONFIG=config/infer.conf $(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(@D) \ INFERCONFIG=config/infer.conf $(INFER_BIN) $(INFER_OPTIONS) -o $(@D) \
--compilation-database $<) --compilation-database $<)

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
INFER_OPTIONS = INFER_OPTIONS =
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -6,9 +6,8 @@
SYM_ROOT = ../codetoanalyze/linters/tsrc_symlink SYM_ROOT = ../codetoanalyze/linters/tsrc_symlink
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = linters
CLANG_OPTIONS = -x objective-c++ -std=c++11 -fblocks -c CLANG_OPTIONS = -x objective-c++ -std=c++11 -fblocks -c
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(SYM_ROOT) INFER_OPTIONS = --no-capture --linters-only --no-filtering --debug-exceptions --project-root $(SYM_ROOT)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(SYM_ROOT)/main.mm SOURCES = $(SYM_ROOT)/main.mm

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -16,6 +14,6 @@ include $(TESTS_DIR)/clang.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS)
$(QUIET)$(call silent_on_success,Testing make clang and javac integration,\ $(QUIET)$(call silent_on_success,Testing make clang and javac integration,\
$(INFER_BIN) --dump-duplicate-symbols --project-root $(TESTS_DIR) -a $(ANALYZER) -- \ $(INFER_BIN) --dump-duplicate-symbols --project-root $(TESTS_DIR) -- \
make -C ../codetoanalyze/make clean all) make -C ../codetoanalyze/make clean all)
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
MVN_DIRS = app_with_submodules simple_app app_with_infer_profile app_with_profiles MVN_DIRS = app_with_submodules simple_app app_with_infer_profile app_with_profiles
@ -26,7 +25,7 @@ infer-out/report.json:
infer-out-%/report.json: $(JAVA_DEPS) $(SOURCES) infer-out-%/report.json: $(JAVA_DEPS) $(SOURCES)
$(QUIET)cd ../codetoanalyze/mvn/$* && \ $(QUIET)cd ../codetoanalyze/mvn/$* && \
$(call silent_on_success,Testing mvn Java integration: $*,\ $(call silent_on_success,Testing mvn Java integration: $*,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) \ $(INFER_BIN) --results-dir $(CURDIR)/$(@D) \
--project-root $(CURDIR)/$(TESTS_DIR) -- \ --project-root $(CURDIR)/$(TESTS_DIR) -- \
$(MVN) clean compile) $(MVN) clean compile)
@ -37,7 +36,7 @@ infer-out-simple_app/report.json: infer-out-app_with_infer_profile/report.json
infer-out-app_with_infer_profile/report.json: infer-out-app_with_profiles/report.json infer-out-app_with_infer_profile/report.json: infer-out-app_with_profiles/report.json
issues-%.exp.test: infer-out-%/report.json issues-%.exp.test: infer-out-%/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@ \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@ \
-o $(<D) --from-json-report $< -o $(<D) --from-json-report $<
issues.exp.test: $(foreach mvndir,$(MVN_DIRS),issues-$(mvndir).exp.test) issues.exp.test: $(foreach mvndir,$(MVN_DIRS),issues-$(mvndir).exp.test)

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
PROJECT_ROOT = ../codetoanalyze/ndk-build/hello_app PROJECT_ROOT = ../codetoanalyze/ndk-build/hello_app
SOURCES = $(PROJECT_ROOT)/hello.c SOURCES = $(PROJECT_ROOT)/hello.c
OBJECTS = $(PROJECT_ROOT)/hello.o OBJECTS = $(PROJECT_ROOT)/hello.o
@ -22,5 +20,5 @@ $(OBJECTS): $(SOURCES)
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)cd $(PROJECT_ROOT) && \ $(QUIET)cd $(PROJECT_ROOT) && \
$(call silent_on_success,Testing ndk-build clang integration,\ $(call silent_on_success,Testing ndk-build clang integration,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ $(INFER_BIN) --results-dir $(CURDIR)/infer-out -- \
$(NDKBUILD) -B NDK_LIBS_OUT=./libs NDK_OUT=./obj) $(NDKBUILD) -B NDK_LIBS_OUT=./libs NDK_OUT=./obj)

@ -7,7 +7,6 @@ TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
CODETOANALYZE_DIR = ../codetoanalyze/objc_getters_setters CODETOANALYZE_DIR = ../codetoanalyze/objc_getters_setters
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m
OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)

@ -7,7 +7,6 @@ TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
CODETOANALYZE_DIR = ../codetoanalyze/objc_missing_fld CODETOANALYZE_DIR = ../codetoanalyze/objc_missing_fld
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m SOURCES = $(CODETOANALYZE_DIR)/A.m $(CODETOANALYZE_DIR)/B.m
OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o OBJECTS = $(CODETOANALYZE_DIR)/A.o $(CODETOANALYZE_DIR)/B.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)

@ -7,7 +7,6 @@ TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/View.m $(CODETOANALYZE_DIR)/ViewController.m $(CODETOANALYZE_DIR)/Caller.m SOURCES = $(CODETOANALYZE_DIR)/View.m $(CODETOANALYZE_DIR)/ViewController.m $(CODETOANALYZE_DIR)/Caller.m
OBJECTS = $(CODETOANALYZE_DIR)/View.o $(CODETOANALYZE_DIR)/ViewController.o $(CODETOANALYZE_DIR)/Caller.o OBJECTS = $(CODETOANALYZE_DIR)/View.o $(CODETOANALYZE_DIR)/ViewController.o $(CODETOANALYZE_DIR)/Caller.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)

@ -7,7 +7,6 @@ TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles_weak CODETOANALYZE_DIR = ../codetoanalyze/objc_retain_cycles_weak
ANALYZER = checkers
SOURCES = $(CODETOANALYZE_DIR)/TimeSpent.m $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.m $(CODETOANALYZE_DIR)/ListAdapter.m SOURCES = $(CODETOANALYZE_DIR)/TimeSpent.m $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.m $(CODETOANALYZE_DIR)/ListAdapter.m
OBJECTS = $(CODETOANALYZE_DIR)/TimeSpent.o $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.o $(CODETOANALYZE_DIR)/ListAdapter.o OBJECTS = $(CODETOANALYZE_DIR)/TimeSpent.o $(CODETOANALYZE_DIR)/AnalyticsTimeSpent.o $(CODETOANALYZE_DIR)/ListAdapter.o
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
INFER_OPTIONS = --project-root src --no-keep-going --racerd-only --filtering INFER_OPTIONS = --project-root src --no-keep-going --racerd-only --filtering
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -6,7 +6,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../.. ROOT_DIR = $(TESTS_DIR)/../..
ANALYZER = checkers
BUCK_TARGET = //infer/tests/build_systems/racerd_traces/module3:module3 BUCK_TARGET = //infer/tests/build_systems/racerd_traces/module3:module3
INFERPRINT_OPTIONS = --project-root $(ROOT_DIR) --issues-tests INFERPRINT_OPTIONS = --project-root $(ROOT_DIR) --issues-tests
CLEAN_EXTRA = $(ROOT_DIR)/buck-out CLEAN_EXTRA = $(ROOT_DIR)/buck-out
@ -24,5 +23,5 @@ infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(REMOVE_DIR) buck-out && \ $(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing thread-safety trace tests with Buck,\ $(call silent_on_success,Testing thread-safety trace tests with Buck,\
INFER_BIN=$(INFER_BIN) \ INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ $(INFER_BIN) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET)) $(BUCK) build --no-cache $(BUCK_TARGET))

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --project-root ../codetoanalyze INFER_OPTIONS = --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -29,5 +27,5 @@ infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS)
$(INFER_BIN) $(INFER_OPTIONS) capture --reactive --continue -- \ $(INFER_BIN) $(INFER_OPTIONS) capture --reactive --continue -- \
clang $(CLANG_OPTIONS) $(SOURCES3)) clang $(CLANG_OPTIONS) $(SOURCES3))
$(QUIET)$(call silent_on_success,Testing reactive mode: analysis,\ $(QUIET)$(call silent_on_success,Testing reactive mode: analysis,\
$(INFER_BIN) analyze --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER)) $(INFER_BIN) analyze --dump-duplicate-symbols $(INFER_OPTIONS))
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CODETOANALYZE_DIR = ../codetoanalyze CODETOANALYZE_DIR = ../codetoanalyze
CLANG_OPTIONS = -c CLANG_OPTIONS = -c

@ -8,12 +8,10 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = linters
CODETOANALYZE_DIR = ../codetoanalyze/componentkit CODETOANALYZE_DIR = ../codetoanalyze/componentkit
CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks
INFER_OPTIONS = --compute-analytics --project-root $(CODETOANALYZE_DIR) INFER_OPTIONS = --no-capture --linters-only --compute-analytics --project-root $(CODETOANALYZE_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --uninit-only --uninit-interproc --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --uninit-only --uninit-interproc --debug-exceptions --project-root $(TESTS_DIR)

@ -5,8 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --project-root ../codetoanalyze INFER_OPTIONS = --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -19,7 +17,7 @@ infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(MAKEFILE_LIST)
# set non-utf8-supporting locale # set non-utf8-supporting locale
$(QUIET)LC_ALL=C; \ $(QUIET)LC_ALL=C; \
$(call silent_on_success,Testing Infer is immune to UTF-8 in procnames,\ $(call silent_on_success,Testing Infer is immune to UTF-8 in procnames,\
$(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(SOURCES)) $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -- clang $(CLANG_OPTIONS) $(SOURCES))
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)
# make sure inferTraceBugs is immune to UTF-8 # make sure inferTraceBugs is immune to UTF-8
$(QUIET)$(call silent_on_success,Testing inferTraceBugs is immune to UTF-8 in procnames,\ $(QUIET)$(call silent_on_success,Testing inferTraceBugs is immune to UTF-8 in procnames,\
@ -30,5 +28,5 @@ infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(MAKEFILE_LIST)
# run again to check that infer manages to delete the results directory # run again to check that infer manages to delete the results directory
$(QUIET)LC_ALL=C; \ $(QUIET)LC_ALL=C; \
$(call silent_on_success,Testing Infer rerun is immune to UTF-8 in procnames,\ $(call silent_on_success,Testing Infer rerun is immune to UTF-8 in procnames,\
$(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(SOURCES)) $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -- clang $(CLANG_OPTIONS) $(SOURCES))
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)

@ -31,7 +31,6 @@ MAKE_DIR = $(UTF8_DIR)/make
MAKE_SOURCES_DIR = ../codetoanalyze/make MAKE_SOURCES_DIR = ../codetoanalyze/make
MAKE_SOURCES = $(wildcard $(MAKE_SOURCES_DIR)/*.c $(MAKE_SOURCES_DIR)/*.java) MAKE_SOURCES = $(wildcard $(MAKE_SOURCES_DIR)/*.c $(MAKE_SOURCES_DIR)/*.java)
ANALYZER = checkers
CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) infer-out-cmake CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) infer-out-cmake
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -67,7 +66,7 @@ infer-out-cmake/report.json: $(CMAKE_DIR) $(CMAKE_SOURCES_DIR)/CMakeLists.txt $(
$(QUIET)cd $(CMAKE_ANALYZE_DIR) && \ $(QUIET)cd $(CMAKE_ANALYZE_DIR) && \
$(call silent_on_success,Testing\ $(call silent_on_success,Testing\
Infer/CMake is immune to UTF-8 in PWD: Makefile execution,\ Infer/CMake is immune to UTF-8 in PWD: Makefile execution,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) -- make) $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- make)
$(QUIET)sed -i -e 's#$(abspath $(CMAKE_DIR))/##g' $@ $(QUIET)sed -i -e 's#$(abspath $(CMAKE_DIR))/##g' $@
infer-out-gradle/report.json: $(JAVA_DEPS) $(GRADLE_DIR) infer-out-gradle/report.json: $(JAVA_DEPS) $(GRADLE_DIR)
@ -75,22 +74,22 @@ infer-out-gradle/report.json: $(JAVA_DEPS) $(GRADLE_DIR)
$(QUIET)PATH=$(CURDIR)/../mock:"$$PATH"; \ $(QUIET)PATH=$(CURDIR)/../mock:"$$PATH"; \
cd $(GRADLE_DIR) && \ cd $(GRADLE_DIR) && \
$(call silent_on_success,Testing Infer/gradle is immune to UTF-8 in PWD,\ $(call silent_on_success,Testing Infer/gradle is immune to UTF-8 in PWD,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) -- gradle build) $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- gradle build)
infer-out-javac/report.json: $(JAVA_DEPS) $(JAVAC_DIR) infer-out-javac/report.json: $(JAVA_DEPS) $(JAVAC_DIR)
$(QUIET)cd $(JAVAC_DIR) && \ $(QUIET)cd $(JAVAC_DIR) && \
$(call silent_on_success,Testing Infer/javac is immune to UTF-8 in PWD,\ $(call silent_on_success,Testing Infer/javac is immune to UTF-8 in PWD,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) -- \ $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- \
$(JAVAC) -cp $(CLASSPATH) $(foreach source,$(JAVAC_SOURCES),$(notdir $(source)))) $(JAVAC) -cp $(CLASSPATH) $(foreach source,$(JAVAC_SOURCES),$(notdir $(source))))
infer-out-make/report.json: $(CLANG_DEPS) $(MAKE_DIR) infer-out-make/report.json: $(CLANG_DEPS) $(MAKE_DIR)
$(QUIET)cd $(MAKE_DIR) && \ $(QUIET)cd $(MAKE_DIR) && \
$(call silent_on_success,Testing Infer/make is immune to UTF-8 in PWD,\ $(call silent_on_success,Testing Infer/make is immune to UTF-8 in PWD,\
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) -- \ $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- \
make clean all) make clean all)
issues-%.exp.test: infer-out-%/report.json $(INFER_BIN) issues-%.exp.test: infer-out-%/report.json $(INFER_BIN)
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@ \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@ \
-o $(<D) --from-json-report $< -o $(<D) --from-json-report $<
issues.exp.test: issues-cmake.exp.test issues-gradle.exp.test issues-javac.exp.test \ issues.exp.test: issues-cmake.exp.test issues-gradle.exp.test issues-javac.exp.test \

@ -6,8 +6,6 @@
CUR_DIR = $(shell pwd) CUR_DIR = $(shell pwd)
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -19,5 +17,5 @@ infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)$(MAKE) -C ../codetoanalyze/make clean $(QUIET)$(MAKE) -C ../codetoanalyze/make clean
$(QUIET)cd ../codetoanalyze/make && \ $(QUIET)cd ../codetoanalyze/make && \
$(call silent_on_success,Testing Waf clang integration,\ $(call silent_on_success,Testing Waf clang integration,\
$(INFER_BIN) --dump-duplicate-symbols --results-dir $(CUR_DIR)/$(@D) -a $(ANALYZER) -- \ $(INFER_BIN) --dump-duplicate-symbols --results-dir $(CUR_DIR)/$(@D) -- \
./waf) ./waf)

@ -5,7 +5,6 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
ANALYZER = checkers
APP_DIR = ../codetoanalyze/xcodebuild/simple_app APP_DIR = ../codetoanalyze/xcodebuild/simple_app
SOURCES = $(wildcard $(APP_DIR)/simple_app/*.m) SOURCES = $(wildcard $(APP_DIR)/simple_app/*.m)
OBJECTS = $(APP_DIR)/app_built OBJECTS = $(APP_DIR)/app_built
@ -24,7 +23,7 @@ infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)cd $(APP_DIR) && \ $(QUIET)cd $(APP_DIR) && \
$(XCODEBUILD) clean && \ $(XCODEBUILD) clean && \
$(call silent_on_success,Testing xcodebuild default integration,\ $(call silent_on_success,Testing xcodebuild default integration,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \ $(INFER_BIN) $(INFER_OPTIONS) --project-root $(TESTS_DIR) \
--results-dir $(CURDIR)/$(@D) -- $(XCODEBUILD)) --results-dir $(CURDIR)/$(@D) -- $(XCODEBUILD))
clean: clean:

@ -5,5 +5,4 @@
include ../xcodebuild/Makefile include ../xcodebuild/Makefile
ANALYZER = linters INFER_OPTIONS = --no-capture --linters-only --no-xcpretty
INFER_OPTIONS = --no-xcpretty

@ -13,8 +13,8 @@ include $(TESTS_DIR)/infer.make
include $(TESTS_DIR)/clang-base.make include $(TESTS_DIR)/clang-base.make
infer-out$(TEST_SUFFIX)/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(TESTS_DIR)/.inferconfig $(MAKEFILE_LIST) infer-out$(TEST_SUFFIX)/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(TESTS_DIR)/.inferconfig $(MAKEFILE_LIST)
$(QUIET)$(call silent_on_success,Testing infer/clang$(ANALYZER_STRING) in $(TEST_REL_DIR),\ $(QUIET)$(call silent_on_success,Testing infer/clang in $(TEST_REL_DIR),\
$(INFER_BIN) --results-dir $(@D) --dump-duplicate-symbols \ $(INFER_BIN) --results-dir $(@D) --dump-duplicate-symbols \
$(INFER_OPTIONS) -a $(ANALYZER) -- \ $(INFER_OPTIONS) -- \
clang $(CLANG_OPTIONS) $(SOURCES)) clang $(CLANG_OPTIONS) $(SOURCES))
$(QUIET)$(call check_no_duplicates,infer-out$(TEST_SUFFIX)/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out$(TEST_SUFFIX)/duplicates.txt)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --biabduction-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --biabduction-only --debug-exceptions --project-root $(TESTS_DIR)

@ -8,7 +8,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = -F --project-root $(TESTS_DIR) --bufferoverrun-only INFER_OPTIONS = -F --project-root $(TESTS_DIR) --bufferoverrun-only
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = \ INFER_OPTIONS = \
--biabduction-only --report-custom-error --developer-mode --no-filtering --debug-exceptions \ --biabduction-only --report-custom-error --developer-mode --no-filtering --debug-exceptions \

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --cost-only --debug-exceptions --project-root $(TESTS_DIR) --use-cost-threshold INFER_OPTIONS = --cost-only --debug-exceptions --project-root $(TESTS_DIR) --use-cost-threshold

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = -F --project-root $(TESTS_DIR) --uninit-only INFER_OPTIONS = -F --project-root $(TESTS_DIR) --uninit-only
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --bufferoverrun-only --ml-buckets cpp --no-filtering --debug-exceptions \ INFER_OPTIONS = --bufferoverrun-only --ml-buckets cpp --no-filtering --debug-exceptions \

@ -6,7 +6,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c -x c++ -std=c++14 CLANG_OPTIONS = -c -x c++ -std=c++14
INFER_OPTIONS = --no-default-checkers --biabduction --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --no-default-checkers --biabduction --check-nullable --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,8 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# use our own clang's standard library so that the tests are uniform across distributions # use our own clang's standard library so that the tests are uniform across distributions
CLANG_OPTIONS = -x c++ -std=c++1y -isystem$(ROOT_DIR) -c CLANG_OPTIONS = -x c++ -std=c++1y -isystem$(ROOT_DIR) -c
INFER_OPTIONS = --biabduction-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) \ INFER_OPTIONS = --biabduction-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) \

@ -5,12 +5,11 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -std=c++11 -c CLANG_OPTIONS = -std=c++11 -c
INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) INFER_OPTIONS = --no-capture --linters-only --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \
$(wildcard *.cpp) $(wildcard *.cpp)
include $(TESTS_DIR)/clang.make include $(TESTS_DIR)/clang.make

@ -5,14 +5,11 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -std=c++11 -c CLANG_OPTIONS = -std=c++11 -c
INFER_OPTIONS = -a linters --linters-def-file extracopy.al --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ INFER_OPTIONS = --no-capture --linters-only --linters-def-file extracopy.al --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL --enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = $(wildcard *.cpp)
$(wildcard *.cpp) \
include $(TESTS_DIR)/clang.make include $(TESTS_DIR)/clang.make

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -x c++ -std=c++14 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c CLANG_OPTIONS = -x c++ -std=c++14 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --liveness-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --liveness-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --biabduction --suggest-nullable --check-nullable --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --biabduction --suggest-nullable --check-nullable --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -x c++ -std=c++14 -Wc++1z-extensions -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c CLANG_OPTIONS = -x c++ -std=c++14 -Wc++1z-extensions -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --ownership-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --ownership-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = \ INFER_OPTIONS = \

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --siof-only --cxx-infer-headers --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --siof-only --cxx-infer-headers --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # 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 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --uninit-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --uninit-only --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = \ INFER_OPTIONS = \
--debug-exceptions --no-default-checkers \ --debug-exceptions --no-default-checkers \
--annotation-reachability --fragment-retains-view --immutable-cast --printf-args --quandary \ --annotation-reachability --fragment-retains-view --immutable-cast --printf-args --quandary \

@ -7,8 +7,6 @@ TESTS_DIR = ../../..
include $(TESTS_DIR)/java.make include $(TESTS_DIR)/java.make
include $(TESTS_DIR)/base.make include $(TESTS_DIR)/base.make
ANALYZER = crashcontext
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)
OBJECTS = $(patsubst %.java,%.class,$(SOURCES)) OBJECTS = $(patsubst %.java,%.class,$(SOURCES))
EXP_TESTs = $(sort $(patsubst %.java,issues-%.exp.test,$(SOURCES))) EXP_TESTs = $(sort $(patsubst %.java,issues-%.exp.test,$(SOURCES)))
@ -20,7 +18,7 @@ $(OBJECTS): $(SOURCES)
# analyze a single source file and generate the test results for it # analyze a single source file and generate the test results for it
issues-%.exp.test: $(JAVA_DEPS) %.stacktrace.json %.java issues-%.exp.test: $(JAVA_DEPS) %.stacktrace.json %.java
$(QUIET)$(call silent_on_success,Testing crashcontext: $*,\ $(QUIET)$(call silent_on_success,Testing crashcontext: $*,\
$(INFER_BIN) -a $(ANALYZER) -o infer-out-$* --stacktrace $*.stacktrace.json \ $(INFER_BIN) --crashcontext-only -o infer-out-$* --stacktrace $*.stacktrace.json \
-- $(JAVAC) -cp $(CLASSPATH) $*.java) -- $(JAVAC) -cp $(CLASSPATH) $*.java)
# add a newline at the end of the json when creating the exp.test # add a newline at the end of the json when creating the exp.test
$(QUIET)$(COPY) infer-out-$*/crashcontext/crashcontext.json $@ && echo >> $@ $(QUIET)$(COPY) infer-out-$*/crashcontext/crashcontext.json $@ && echo >> $@

@ -5,13 +5,12 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = \ INFER_OPTIONS = \
--eradicate-only \ --eradicate-only \
--eradicate-return-over-annotated \ --eradicate-return-over-annotated \
--eradicate-optional-present \ --eradicate-optional-present \
--eradicate-condition-redundant \ --eradicate-condition-redundant \
--debug-exceptions --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) $(wildcard $(TESTS_DIR)/external/library/*.java) SOURCES = $(wildcard *.java) $(wildcard $(TESTS_DIR)/external/library/*.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --loop-hoisting-only --invariant-by-default --debug-exceptions INFER_OPTIONS = --loop-hoisting-only --invariant-by-default --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --biabduction-only --debug-exceptions INFER_OPTIONS = --biabduction-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --resource-leak-only --debug-exceptions INFER_OPTIONS = --resource-leak-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --litho-only --debug-exceptions INFER_OPTIONS = --litho-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --cost-only --debug-exceptions --use-cost-threshold INFER_OPTIONS = --cost-only --debug-exceptions --use-cost-threshold
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --quandary-only --passthroughs --debug-exceptions INFER_OPTIONS = --quandary-only --passthroughs --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --racerd-only --debug-exceptions INFER_OPTIONS = --racerd-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --racerd-only --debug-exceptions --racerd-use-path-stability INFER_OPTIONS = --racerd-only --debug-exceptions --racerd-use-path-stability
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --starvation-only --debug-exceptions INFER_OPTIONS = --starvation-only --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
INFER_OPTIONS = --biabduction-only --tracing --debug-exceptions INFER_OPTIONS = --biabduction-only --tracing --debug-exceptions
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
CLEAN_EXTRA = infer-out-arc infer-out-all infer-out-all infer-out-arc \ CLEAN_EXTRA = infer-out-arc infer-out-all infer-out-all infer-out-arc \
@ -125,27 +124,27 @@ $(OBJECTS_BASE) $(OBJECTS_BUCKETS_ALL): $(SOURCES_BASE) $(SOURCES_BUCKET_ALL)
infer-out-all/report.json: $(CLANG_DEPS) $(SOURCES_BUCKET_ALL) infer-out-all/report.json: $(CLANG_DEPS) $(SOURCES_BUCKET_ALL)
$(QUIET)$(call silent_on_success,Testing infer/Objective-C with all memleak buckets,\ $(QUIET)$(call silent_on_success,Testing infer/Objective-C with all memleak buckets,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets all -o infer-out-all -- \ $(INFER_BIN) $(INFER_OPTIONS) --ml-buckets all -o infer-out-all -- \
clang $(CLANG_OPTIONS) $(SOURCES_BUCKET_ALL)) clang $(CLANG_OPTIONS) $(SOURCES_BUCKET_ALL))
$(QUIET)$(call check_no_duplicates,infer-out-all/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out-all/duplicates.txt)
infer-out-arc/report.json: $(CLANG_DEPS) $(SOURCES_ARC) infer-out-arc/report.json: $(CLANG_DEPS) $(SOURCES_ARC)
$(QUIET)$(call silent_on_success,Testing infer/Objective-C with arc memleak buckets,\ $(QUIET)$(call silent_on_success,Testing infer/Objective-C with arc memleak buckets,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets cf -o infer-out-arc -- \ $(INFER_BIN) $(INFER_OPTIONS) --ml-buckets cf -o infer-out-arc -- \
clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES_ARC)) clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES_ARC))
$(QUIET)$(call check_no_duplicates,infer-out-arc/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out-arc/duplicates.txt)
infer-out/report.json: $(CLANG_DEPS) $(SOURCES_DEFAULT) infer-out/report.json: $(CLANG_DEPS) $(SOURCES_DEFAULT)
$(QUIET)$(call silent_on_success,Testing infer/Objective-C with CF memleak buckets,\ $(QUIET)$(call silent_on_success,Testing infer/Objective-C with CF memleak buckets,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets cf -o infer-out -- \ $(INFER_BIN) $(INFER_OPTIONS) --ml-buckets cf -o infer-out -- \
clang $(CLANG_OPTIONS) $(SOURCES_DEFAULT)) clang $(CLANG_OPTIONS) $(SOURCES_DEFAULT))
$(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt)
issues.exp.test: infer-out-all/report.json infer-out-arc/report.json infer-out/report.json issues.exp.test: infer-out-all/report.json infer-out-arc/report.json infer-out/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.all \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.all \
-o infer-out-all --from-json-report infer-out-all/report.json -o infer-out-all --from-json-report infer-out-all/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.arc \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.arc \
-o infer-out-arc --from-json-report infer-out-arc/report.json -o infer-out-arc --from-json-report infer-out-arc/report.json
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@.default \ $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@.default \
-o infer-out --from-json-report infer-out/report.json -o infer-out --from-json-report infer-out/report.json
$(QUIET)cat $@.all $@.arc $@.default > $@ $(QUIET)cat $@.all $@.arc $@.default > $@

@ -7,8 +7,7 @@ TESTS_DIR = ../../..
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
ANALYZER = linters INFER_OPTIONS = --no-capture --linters-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--iphoneos-target-sdk-version 8.0 \ --iphoneos-target-sdk-version 8.0 \
--iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/filter_out_unavailable_api\.m:10.0" \ --iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/filter_out_unavailable_api\.m:10.0" \
--iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/RemoveObserverInGivenSDKTest\.m:9.0" \ --iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/RemoveObserverInGivenSDKTest\.m:9.0" \

@ -5,9 +5,8 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -c -fobjc-arc $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c -fobjc-arc $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR) INFER_OPTIONS = --no-capture --linters-only --linters-def-folder checks --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = file.m SOURCES = file.m

@ -5,9 +5,8 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -fobjc-arc -c $(IOS_CLANG_OPTIONS) CLANG_OPTIONS = -fobjc-arc -c $(IOS_CLANG_OPTIONS)
INFER_OPTIONS = --cxx --linters-def-file al_definitions/linters_example.al --project-root $(TESTS_DIR) INFER_OPTIONS = --no-capture --linters-only --cxx --linters-def-file al_definitions/linters_example.al --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \

@ -5,10 +5,10 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ INFER_OPTIONS = \
--linters-doc-url "ASSIGN_POINTER_WARNING:www.example.com" --no-capture --linters-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--linters-doc-url "ASSIGN_POINTER_WARNING:www.example.com"
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -fobjc-arc -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -fobjc-arc -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -7,8 +7,7 @@ TESTS_DIR = ../../..
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
ANALYZER = quandary INFER_OPTIONS = --quandary-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
INFER_OPTIONS = --uninit-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --uninit-only --debug-exceptions --project-root $(TESTS_DIR)

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS) -fobjc-arc CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS) -fobjc-arc
INFER_OPTIONS = --biabduction-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --biabduction-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,16 +5,15 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS) CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) INFER_OPTIONS = --no-capture --linters-only --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \
$(wildcard *.m) \ $(wildcard *.m) \
$(wildcard */*.m) \ $(wildcard */*.m) \
$(wildcard *.mm) \ $(wildcard *.mm) \
$(wildcard *.c) \ $(wildcard *.c) \
include $(TESTS_DIR)/clang.make include $(TESTS_DIR)/clang.make
include $(TESTS_DIR)/objc.make include $(TESTS_DIR)/objc.make

@ -5,10 +5,10 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = linters
CLANG_OPTIONS = -c -fobjc-arc $(OBJCPP_CLANG_OPTIONS) CLANG_OPTIONS = -c -fobjc-arc $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ INFER_OPTIONS = \
--enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL --no-capture --linters-only --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \
--enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = \ SOURCES = \

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS) CLANG_OPTIONS = -fobjc-arc -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --liveness-only --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -5,7 +5,6 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers
CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS) CLANG_OPTIONS = -c $(OBJCPP_CLANG_OPTIONS)
INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR) INFER_OPTIONS = --debug-exceptions --no-default-checkers --suggest-nullable --check-nullable --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests

@ -7,13 +7,10 @@ INFER_OUT ?= infer-out$(TEST_SUFFIX)
include $(TESTS_DIR)/base.make include $(TESTS_DIR)/base.make
# useful to print non-default analyzer
ANALYZER_STRING=$(shell if [ -n $(ANALYZER) ]; then printf ' ($(ANALYZER))'; fi)
default: compile default: compile
issues.exp.test$(TEST_SUFFIX): $(INFER_OUT)/report.json $(INFER_BIN) issues.exp.test$(TEST_SUFFIX): $(INFER_OUT)/report.json $(INFER_BIN)
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) --results-dir $(<D) \ $(QUIET)$(INFER_BIN) report -q --results-dir $(<D) \
$(INFERPRINT_OPTIONS) $@ --from-json-report $< $(INFERPRINT_OPTIONS) $@ --from-json-report $<
.PHONY: compile .PHONY: compile

@ -6,9 +6,8 @@
# Makefiles that include this one must define TESTS_DIR and then include # Makefiles that include this one must define TESTS_DIR and then include
# $(TESTS_DIR)/javac.make. # $(TESTS_DIR)/javac.make.
# #
# Makefiles that include this one must define the ANALYZER and SOURCES # Makefiles that include this one must define the SOURCES variable, and may optionally define
# variables, and may optionally define INFER_OPTIONS, INFERPRINT_OPTIONS, # INFER_OPTIONS, INFERPRINT_OPTIONS, CLEAN_EXTRA.
# CLEAN_EXTRA.
OBJECTS = $(patsubst %.java,%.class,$(SOURCES)) OBJECTS = $(patsubst %.java,%.class,$(SOURCES))
@ -21,7 +20,7 @@ $(OBJECTS): $(SOURCES)
$(JAVAC) -cp $(CLASSPATH) $(SOURCES) $(JAVAC) -cp $(CLASSPATH) $(SOURCES)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(MAKEFILE_LIST) infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(call silent_on_success,Testing infer/java$(ANALYZER_STRING) in $(TEST_REL_DIR),\ $(QUIET)$(call silent_on_success,Testing infer/java in $(TEST_REL_DIR),\
$(INFER_BIN) -a $(ANALYZER) --project-root $(PROJECT_ROOT) \ $(INFER_BIN) --project-root $(PROJECT_ROOT) \
$(INFER_OPTIONS) -- \ $(INFER_OPTIONS) -- \
$(JAVAC) -cp $(CLASSPATH) $(SOURCES)) $(JAVAC) -cp $(CLASSPATH) $(SOURCES))

Loading…
Cancel
Save