|
|
|
# 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 = ../..
|
|
|
|
|
|
|
|
ANALYZER = checkers
|
|
|
|
INFERPRINT_OPTIONS = --issues-tests
|
|
|
|
|
|
|
|
MVN_DIRS = app_with_submodules simple_app app_with_infer_profile app_with_profiles
|
|
|
|
|
|
|
|
CLEAN_EXTRA = \
|
|
|
|
$(MVN_DIRS:%=../codetoanalyze/mvn/%/target) \
|
|
|
|
$(MVN_DIRS:%=../codetoanalyze/mvn/%/com) \
|
|
|
|
$(MVN_DIRS:%=infer-out-%) \
|
|
|
|
$(MVN_DIRS:%=issues-%.exp.test)
|
|
|
|
|
|
|
|
include $(TESTS_DIR)/java.make
|
|
|
|
include $(TESTS_DIR)/infer.make
|
|
|
|
|
|
|
|
infer-out/report.json:
|
|
|
|
$(QUIET)$(MKDIR_P) $(@D)
|
|
|
|
$(QUIET)touch $@
|
|
|
|
|
|
|
|
infer-out-%/report.json: $(JAVA_DEPS) $(SOURCES)
|
|
|
|
$(QUIET)cd ../codetoanalyze/mvn/$* && \
|
|
|
|
$(call silent_on_success,Testing mvn Java integration: $*,\
|
|
|
|
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/$(@D) \
|
|
|
|
--project-root $(CURDIR)/$(TESTS_DIR) -- \
|
|
|
|
$(MVN) clean compile)
|
|
|
|
|
|
|
|
infer-out-app_with_submodules/report.json: infer-out-simple_app/report.json
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
issues-%.exp.test: infer-out-%/report.json
|
[CLI] switch to infer-<command> (symlinks) executables
Summary:
Introduce `infer-<command>` for each command, except for internal commands
(only `infer-clang` for now) which are not exported. Install these executables
(which are just symlinks to `infer`) on `make install`. The main executable
looks at the name it was invoked with to figure out if it should behave as a
particular command.
Get rid of `InferClang`, `InferAnalyze`, and `InferPrint`. As a bonus, we now
only need to build one executable: `infer`, which should be a few seconds
faster (less link time).
`InferAnalyze` is now `infer-analyze` and `InferPrint` is `infer-print`. To run
`InferClang`, use a symlink named `clang`, `clang++`, etc. to `infer`. There
are such symlinks available in "infer/lib/wrappers/" already.
I also noticed that the scripts in xcodebuild_wrappers/ don't seem useful
anymore, so use wrappers/ instead, as for `make`.
Reviewed By: mbouaziz
Differential Revision: D5036495
fbshipit-source-id: 4a90030
8 years ago
|
|
|
$(QUIET)$(INFER_BIN) report -q -a $(ANALYZER) $(INFERPRINT_OPTIONS) $@ --from-json-report $<
|
|
|
|
|
|
|
|
issues.exp.test: $(foreach mvndir,$(MVN_DIRS),issues-$(mvndir).exp.test)
|
|
|
|
# erase the contents of the file
|
|
|
|
$(QUIET): > $@
|
|
|
|
# remember the file name so it's easier to know which bug is from where
|
|
|
|
$(QUIET)for mvndir in $(MVN_DIRS); do \
|
|
|
|
echo "-- $$mvndir" >> $@; \
|
|
|
|
cat issues-$$mvndir.exp.test >> $@; \
|
|
|
|
done
|