[make] make frontend tests more functional

Summary: These direct tests were still mostly relying on PHONY targets.

Reviewed By: jberdine

Differential Revision: D4326469

fbshipit-source-id: 37b2d0a
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent bd0751dd1c
commit a6be58848b

@ -52,17 +52,13 @@ XCODE_SELECT = @XCODE_SELECT@
ifneq (,$(findstring s,$(MAKEFLAGS)))
# quiet mode
LN_S = @LN_S@
REMOVE = rm -f
REMOVE_DIR = rm -rf
RSYNC_A = rsync -av
else
LN_S = @LN_S@ -v
REMOVE = rm -vf
REMOVE_DIR = rm -rvf
RSYNC_A = rsync -aq
endif
COPY = cp -f
COPY_DIR = cp -Rf
REMOVE = rm -f
REMOVE_DIR = rm -rf
ABSOLUTE_ROOT_DIR = $(shell cd $(ROOT_DIR) && pwd)

@ -18,7 +18,7 @@ include $(TESTS_DIR)/base.make
$(OBJECTS): $(SOURCES)
ant
infer-out/report.json: $(INFER_BIN) $(SOURCES)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) --project-root $(TESTS_DIR) --inferconfig-home . -- ant)

@ -5,8 +5,6 @@
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
CURDIR = $(shell pwd)
TESTS_DIR = ../..
ROOT_DIR = $(TESTS_DIR)/../..
@ -26,5 +24,5 @@ $(JAR_OUTPUT): $(JAVA_SOURCE_FILES)
genrule: $(JAR_OUTPUT)
cd $(ROOT_DIR) && $(call silent_on_success, INFER_BIN=$(INFER_BIN) NO_BUCKD=1 GENERATE_INFER_GENRULES=1 buck build --no-cache //infer/tests/build_systems/genrule/module2:module2_infer)
infer-out/report.json: genrule $(INFER_BIN) $(JAVA_SOURCE_FILES)
infer-out/report.json: genrule $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
cd $(ROOT_DIR) && $(call silent_on_success, INFER_BIN=$(INFER_BIN) NO_BUCKD=1 $(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- buck build --no-cache //infer/tests/codetoanalyze/java/infer:compile)

@ -12,7 +12,7 @@ CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build
ANALYZER = infer
CLEAN_EXTRA = $(CMAKE_BUILD_DIR)
INFER_OPTIONS = --cxx --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
OBJECTS = $(CMAKE_BUILD_DIR)/compile_commands.json
INFERPRINT_OPTIONS = --issues-tests
@ -29,15 +29,15 @@ $(CMAKE_BUILD_DIR)/compile_commands.json: $(SOURCES) $(CMAKE_DIR)/CMakeLists.txt
infer-out/report.json:
# make this target empty - since this test defines issues.exp.test directly
infer-out-with-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(INFER_BIN) $(SOURCES)
infer-out-with-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o infer-out-with-index --changed-files-index $(CMAKE_DIR)/index.txt --clang-compilation-db-files $<)
infer-out-no-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(INFER_BIN) $(SOURCES)
infer-out-no-index/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o infer-out-no-index --clang-compilation-db-files $<)
infer-out-reactive-capture/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(INFER_BIN) $(SOURCES)
infer-out-reactive-capture/report.json: $(CMAKE_BUILD_DIR)/compile_commands.json $(CLANG_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o infer-out-reactive-capture --reactive-capture \
--changed-files-index $(CMAKE_DIR)/index.txt --clang-compilation-db-files $<)

@ -19,40 +19,35 @@ SOURCES = \
$(SYM_ROOT)/main_symlink.cpp \
$(SYM_ROOT)/main_default_symlink.cpp \
include $(TESTS_DIR)/clang-frontend.make
DOT_FILES = $(SOURCES:=.test.dot)
CLEAN_EXTRA = $(DOT_FILES) $(foreach source,$(SOURCES),infer-out-$(basename $(notdir $(source))))
INFER_OPTIONS = -a capture --frontend-tests --cxx --skip-translation-headers exclude_dir
include $(TESTS_DIR)/clang-frontend.make
compile:
clang $(CLANG_OPTIONS) $(SOURCES)
INFER_OPTIONS = -a capture --frontend-tests --skip-translation-headers exclude_dir
capture:
$(call silent_on_success,\
$(INFER_BIN) $(INFER_OPTIONS) --project-root $(ROOT) \
--icfg-dotty-outfile $(ROOT)/main.cpp.test.dot -- \
clang $(CLANG_OPTIONS) $(ROOT)/main.cpp)
$(call silent_on_success,\
$(INFER_BIN) $(INFER_OPTIONS) --project-root $(SYM_ROOT) \
--icfg-dotty-outfile $(SYM_ROOT)/main_symlink.cpp.test.dot -- \
clang $(CLANG_OPTIONS) $(SYM_ROOT)/main.cpp)
capture: $(DOT_FILES)
cd $(ROOT) && \
$(ROOT)/main.cpp.test.dot $(SYM_ROOT)/main_symlink.cpp.test.dot: $(SOURCES) $(CLANG_DEPS)
$(call silent_on_success,\
$(INFER_BIN) $(INFER_OPTIONS) --icfg-dotty-outfile main_default_root.cpp.test.dot -- \
clang $(CLANG_OPTIONS) main.cpp)
$(INFER_BIN) $(INFER_OPTIONS) --results-dir infer-out-$(basename $(@F:.test.dot=)) \
--project-root $(ROOT) --icfg-dotty-outfile $@ -- \
clang $(CLANG_OPTIONS) $(@:.test.dot=))
cd $(SYM_ROOT) && \
$(ROOT)/main_default_root.cpp.test.dot $(SYM_ROOT)/main_default_symlink.cpp.test.dot: \
$(CLANG_DEPS) $(SOURCES)
cd $(@D) && \
$(call silent_on_success,\
$(INFER_BIN) $(INFER_OPTIONS) --icfg-dotty-outfile main_default_symlink.cpp.test.dot -- \
clang $(CLANG_OPTIONS) main.cpp)
$(INFER_BIN) $(INFER_OPTIONS) --results-dir $(CURDIR)/infer-out-$(basename $(@F:.test.dot=)) \
--icfg-dotty-outfile $(@F) -- \
clang $(CLANG_OPTIONS) $(@F:.test.dot=))
# test_extra needs to be separate target. Otherwise commands from test
# target in common Makefile won't run
test: test_extra
# all dot files should be exactly the same - if they aren't there is something wrong
test_extra:
diff $(ROOT)/main.cpp.dot $(SYM_ROOT)/main_symlink.cpp.dot && \
diff $(ROOT)/main.cpp.dot $(ROOT)/main_default_root.cpp.dot && \
diff $(ROOT)/main.cpp.dot $(SYM_ROOT)/main_default_symlink.cpp.dot
test_extra: $(DOT_FILES)
diff -u $(ROOT)/main.cpp.test.dot $(SYM_ROOT)/main_symlink.cpp.test.dot
diff -u $(ROOT)/main.cpp.test.dot $(ROOT)/main_default_root.cpp.test.dot
diff -u $(ROOT)/main.cpp.test.dot $(SYM_ROOT)/main_default_symlink.cpp.test.dot

@ -0,0 +1,18 @@
# Copyright (c) 2016 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
%.o: %.c
clang $(CLANG_OPTIONS) -o $@ $<
%.o: %.cpp
clang++ $(CLANG_OPTIONS) -o $@ $<
%.o: %.m
clang $(CLANG_OPTIONS) -o $@ $<
%.o: %.mm
clang++ $(CLANG_OPTIONS) -o $@ $<

@ -8,20 +8,40 @@
ROOT_DIR = $(TESTS_DIR)/../..
include $(ROOT_DIR)/Makefile.config
OBJECTS = $(foreach source,$(SOURCES),$(basename $(source)).o)
include $(TESTS_DIR)/clang-base.make
ONE_SOURCE = $(lastword $(SOURCES))
default: compile
compile: $(OBJECTS)
$(ONE_SOURCE).test.dot: $(CLANG_DEPS) $(SOURCES) $(HEADERS)
$(call silent_on_success, \
$(INFER_BIN) -a capture --frontend-tests --project-root $(TESTS_DIR) $(INFER_OPTIONS) -- \
clang $(CLANG_OPTIONS) $(SOURCES))
.PHONY: capture
capture: $(ONE_SOURCE).test.dot
.PHONY: print
print: capture
.PHONY: test
test: capture
set -e; \
for file in $(SOURCES) ; do \
diff -u $$file.dot $$file.test.dot ; \
done
$(MAKE) clean
@for file in $(SOURCES) ; do \
diff -u $$file.dot $$file.test.dot || error=1 ; \
done ; \
if [ 0$$error -eq 1 ]; then exit 1; fi
.PHONY: replace
replace: capture
for file in $(SOURCES) ; do \
mv $$file.test.dot $$file.dot ; \
@for file in $(SOURCES) ; do \
mv $$file.test.dot $$file.dot ; \
done
$(MAKE) clean
.PHONY: clean
clean:
rm -rf infer-out *.o */*.test.dot */*/*.test.dot
$(REMOVE_DIR) infer-out $(OBJECTS) */*.test.dot */*/*.test.dot $(CLEAN_EXTRA)

@ -7,24 +7,14 @@
ROOT_DIR = $(TESTS_DIR)/../..
OBJECTS = $(foreach source,$(SOURCES),$(basename $(source)).o)
CLEAN_EXTRA += duplicates.txt
OBJECTS = $(foreach source,$(SOURCES),$(basename $(source)).o)
include $(TESTS_DIR)/base.make
include $(TESTS_DIR)/clang-base.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS)
$(call silent_on_success,\
$(INFER_BIN) --check-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(SOURCES) 2>duplicates.txt)
grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0
%.o: %.c
clang $(CLANG_OPTIONS) -o $@ $<
%.o: %.cpp
clang++ $(CLANG_OPTIONS) -o $@ $<
%.o: %.m
clang $(CLANG_OPTIONS) -o $@ $<
%.o: %.mm
clang++ $(CLANG_OPTIONS) -o $@ $<

@ -14,9 +14,3 @@ SOURCES = \
$(wildcard */*.cpp) \
include $(TESTS_DIR)/clang-frontend.make
compile:
clang $(CLANG_OPTIONS) $(SOURCES)
capture:
$(call silent_on_success,$(INFER_BIN) -a capture --frontend-tests --cxx --project-root $(TESTS_DIR) -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -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 = --cxx --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = \

@ -12,7 +12,7 @@ ANALYZER = infer
# Use the system headers of our own clang. This way, we always use the same system headers
# regardless of the libraries installed on the machine.
CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c
INFER_OPTIONS = --cxx --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = \

@ -8,16 +8,14 @@
TESTS_DIR=../../..
# 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 = \
-nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ \
-x c++ -std=c++11 -c
INFER_OPTIONS = --headers
SOURCES = \
$(wildcard */*.cpp) \
$(wildcard shared/*/*.cpp) \
include $(TESTS_DIR)/clang-frontend.make
compile:
clang $(CLANG_OPTIONS) $(SOURCES)
capture:
$(call silent_on_success,$(INFER_BIN) -a capture --frontend-tests --cxx --headers --project-root $(TESTS_DIR) -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -10,7 +10,7 @@ TESTS_DIR = ../../..
ANALYZER = quandary
# 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 = --cxx --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = \

@ -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 = --cxx --check-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFER_OPTIONS = --check-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES_DEFAULT = \
@ -110,19 +110,19 @@ $(OBJECTS_ARC): $(SOURCES_ARC)
$(OBJECTS_BASE) $(OBJECTS_BUCKETS_ALL): $(SOURCES_BASE) $(SOURCES_BUCKET_ALL)
clang $(CLANG_OPTIONS) $*
infer-out-all/report.json: $(INFER_BIN) $(SOURCES_BUCKET_ALL)
infer-out-all/report.json: $(CLANG_DEPS) $(SOURCES_BUCKET_ALL)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets all -o infer-out-all -- \
clang $(CLANG_OPTIONS) $(SOURCES_BUCKET_ALL) 2>duplicates.txt)
grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0
infer-out-arc/report.json: $(INFER_BIN) $(SOURCES_ARC)
infer-out-arc/report.json: $(CLANG_DEPS) $(SOURCES_ARC)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets cf -o infer-out-arc -- \
clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES_ARC) 2>duplicates.txt)
grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0
infer-out/report.json: $(INFER_BIN) $(SOURCES_DEFAULT)
infer-out/report.json: $(CLANG_DEPS) $(SOURCES_DEFAULT)
$(call silent_on_success,\
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) --ml-buckets cf -o infer-out -- \
clang $(CLANG_OPTIONS) $(SOURCES_DEFAULT) 2>duplicates.txt)

@ -5,88 +5,24 @@
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
TESTS_DIR=../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
.PHONY: arc.clean noarc.clean
%.clean:
@$(MAKE) -C $% clean
XCODEROOT = $(shell xcode-select -p)
.PHONY: arc.print noarc.print
%.print:
@$(MAKE) -C $% print
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
.PHONY: arc.test noarc.test
%.test:
@$(MAKE) -C $% test
SOURCES_NOARC = \
block/retain_cycle.m \
block/static.m \
boxing/Boxing.m \
boxing/array.m \
boxing/array_literal.c \
boxing/dict_literal.c \
boxing/string_literal.c \
conditional_operation/ConditionalOperation.m \
exceptions/ExceptionExample.m \
fast_enumeration/Fast_enumeration.m \
property/PropertyCustomAccessor.m \
property/PropertyImplSetter.m \
property/Property_getter.m \
property/aclass.m \
property/main_car.m \
property_in_protocol/Test.m \
protocol/protocol.m \
returnstmt/void_return.m \
self_static/Self.m \
self_static/static.m \
shared/block/block-it.m \
shared/block/block.m \
shared/block/block_no_args.m \
shared/block/block_release.m \
shared/block/dispatch.m \
shared/block/dispatch_examples.m \
shared/block/dispatch_in_macro.m \
shared/category_procdesc/EOCPerson.m \
shared/category_procdesc/main.c \
shared/field_superclass/SuperExample.m \
shared/memory_leaks_benchmark/AutoreleaseExample.m \
shared/memory_leaks_benchmark/MemoryLeakExample.m \
shared/memory_leaks_benchmark/RetainReleaseExample.m \
shared/memory_leaks_benchmark/RetainReleaseExample2.m \
shared/memory_leaks_benchmark/TollBridgeExample.m \
shared/npe/npe_malloc.m \
shared/property/GetterExample.m \
shared/property/PropertyAttributes.m \
shared/protocol_procdesc/Bicycle.m \
shared/protocol_procdesc/main.c \
strings/global_string_literal.m \
strings/string_literal.m \
subclass/MyClass.m \
subclass/MySubClass.m \
subclass/main.c \
types/testloop.m \
vardecl/aclass.m \
vardecl/aclass_2.m \
vardecl/last_af.m \
.PHONY: clean
clean: arc.clean noarc.clean
SOURCES_ARC = \
predefined_expr/PredefinedExprExample.m \
types/attributes.m \
types/void_call.m \
vardecl/initlist.m \
shared/assertions/NSAssert_example.m \
shared/block/BlockVar.m \
shared/memory_leaks_benchmark/ArcExample.m \
shared/memory_leaks_benchmark/arc_methods.m \
shared/npe/Nonnull_attribute_example.m \
.PHONY: print
print: arc.print noarc.print
SOURCES = \
$(SOURCES_NOARC) \
$(SOURCES_ARC) \
include $(TESTS_DIR)/clang-frontend.make
compile:
clang $(CLANG_OPTIONS) $(SOURCES_NOARC)
clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES_ARC)
capture:
$(call silent_on_success,$(INFER_BIN) -a capture --cxx --frontend-tests --continue --reactive --project-root $(TESTS_DIR) -- clang $(CLANG_OPTIONS) $(SOURCES_NOARC))
$(call silent_on_success,$(INFER_BIN) -a capture --cxx --frontend-tests --project-root $(TESTS_DIR) -- clang $(CLANG_OPTIONS) -fobjc-arc $(SOURCES_ARC))
.PHONY: test
test: arc.test noarc.test

@ -0,0 +1,31 @@
# Copyright (c) 2016 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \
-fbobjc-arc
SOURCES = \
../predefined_expr/PredefinedExprExample.m \
../types/attributes.m \
../types/void_call.m \
../vardecl/initlist.m \
../shared/assertions/NSAssert_example.m \
../shared/block/BlockVar.m \
../shared/memory_leaks_benchmark/ArcExample.m \
../shared/memory_leaks_benchmark/arc_methods.m \
../shared/npe/Nonnull_attribute_example.m \
include $(TESTS_DIR)/clang-frontend.make

@ -0,0 +1,70 @@
# Copyright (c) 2016 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
TESTS_DIR = ../../../..
IPHONESIMULATOR_ISYSROOT_SUFFIX = \
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
XCODEROOT = $(shell xcode-select -p)
CLANG_OPTIONS = -x objective-c \
-isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \
-mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c
SOURCES = \
../block/retain_cycle.m \
../block/static.m \
../boxing/Boxing.m \
../boxing/array.m \
../boxing/array_literal.c \
../boxing/dict_literal.c \
../boxing/string_literal.c \
../conditional_operation/ConditionalOperation.m \
../exceptions/ExceptionExample.m \
../fast_enumeration/Fast_enumeration.m \
../property/PropertyCustomAccessor.m \
../property/PropertyImplSetter.m \
../property/Property_getter.m \
../property/aclass.m \
../property/main_car.m \
../property_in_protocol/Test.m \
../protocol/protocol.m \
../returnstmt/void_return.m \
../self_static/Self.m \
../self_static/static.m \
../shared/block/block-it.m \
../shared/block/block.m \
../shared/block/block_no_args.m \
../shared/block/block_release.m \
../shared/block/dispatch.m \
../shared/block/dispatch_examples.m \
../shared/block/dispatch_in_macro.m \
../shared/category_procdesc/EOCPerson.m \
../shared/category_procdesc/main.c \
../shared/field_superclass/SuperExample.m \
../shared/memory_leaks_benchmark/AutoreleaseExample.m \
../shared/memory_leaks_benchmark/MemoryLeakExample.m \
../shared/memory_leaks_benchmark/RetainReleaseExample.m \
../shared/memory_leaks_benchmark/RetainReleaseExample2.m \
../shared/memory_leaks_benchmark/TollBridgeExample.m \
../shared/npe/npe_malloc.m \
../shared/property/GetterExample.m \
../shared/property/PropertyAttributes.m \
../shared/protocol_procdesc/Bicycle.m \
../shared/protocol_procdesc/main.c \
../strings/global_string_literal.m \
../strings/string_literal.m \
../subclass/MyClass.m \
../subclass/MySubClass.m \
../subclass/main.c \
../types/testloop.m \
../vardecl/aclass.m \
../vardecl/aclass_2.m \
../vardecl/last_af.m \
include $(TESTS_DIR)/clang-frontend.make

@ -19,9 +19,3 @@ SOURCES = \
$(wildcard */*.mm) \
include $(TESTS_DIR)/clang-frontend.make
compile:
clang $(CLANG_OPTIONS) $(SOURCES)
capture:
$(call silent_on_success,$(INFER_BIN) -a capture --cxx --frontend-tests --continue --reactive --project-root $(TESTS_DIR) -- clang $(CLANG_OPTIONS) $(SOURCES))

@ -20,6 +20,6 @@ include $(TESTS_DIR)/base.make
$(OBJECTS): $(SOURCES)
javac -cp $(CLASSPATH) $(SOURCES)
infer-out/report.json: $(INFER_BIN) $(SOURCES)
infer-out/report.json: $(JAVA_DEPS) $(SOURCES)
$(call silent_on_success,\
$(INFER_BIN) --project-root $(TESTS_DIR) --inferconfig-home . $(INFER_OPTIONS) -a $(ANALYZER) -- javac -cp $(CLASSPATH) $(SOURCES))

Loading…
Cancel
Save