test OSS build as part of `make test`

Summary:
- `test_build` now also test that the OSS build works if we're inside the internal repo
- remove some "if java/clang" in the test targets, since tests work under the
  assumption that all the analyzers are to be tested.

Reviewed By: jberdine

Differential Revision: D3305088

fbshipit-source-id: 142fc49
master
Jules Villard 9 years ago committed by Facebook Github Bot 4
parent c31db8436c
commit 13cb7d8ed9

@ -22,6 +22,7 @@ FCP_CLANG_OCAML_DIR = $(FCP_DIR)/clang-ocaml
ANNOTATIONS_DIR = $(INFER_DIR)/annotations
BIN_DIR = $(INFER_DIR)/bin
BUILD_DIR = $(INFER_DIR)/_build
LIB_DIR = $(INFER_DIR)/lib
MODELS_DIR = $(INFER_DIR)/models
SRC_DIR = $(INFER_DIR)/src

@ -74,25 +74,30 @@ endif
inferTraceBugs: $(INFERTRACEBUGS_BIN_RELPATH)
test_build: clang_plugin
test_this_build: clang_plugin
$(MAKE) -C $(SRC_DIR) test_build
test_oss_build: clang_plugin
# make sure we don't break the opensource build
$(MAKE) -C $(SRC_DIR) EXTRA_DEPS=opensource LLVM_BUILD_DIR=$(BUILD_DIR)/llvm_opensource TEST_BUILD_DIR=$(BUILD_DIR)/opensource test_build
test_build: test_this_build
ifeq (@IS_FACEBOOK_TREE@,yes)
test_build: test_oss_build
endif
ocaml_unit_test: infer
$(INFERUNIT_BIN)
buck_test: infer
NO_BUCKD=1 buck clean
NO_BUCKD=1 buck test $(TARGETS_TO_TEST)
ifeq (@BUILD_JAVA_ANALYZERS@,yes)
NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py
endif
buck_test_xml: infer
NO_BUCKD=1 buck clean
NO_BUCKD=1 buck test --xml test.xml $(TARGETS_TO_TEST)
ifeq (@BUILD_JAVA_ANALYZERS@,yes)
NO_BUCKD=1 ./infer/tests/build_systems/build_integration_tests.py
endif
inferTraceBugs_test: infer
$(INFER_BIN) -o __test-infer-out__ -- \

@ -17,7 +17,6 @@ ATDGEN = @ATDGEN@
#### Global declarations ####
BUILD_DIR = $(INFER_DIR)/_build
INFER_BUILD_DIR = $(BUILD_DIR)/infer
TEST_BUILD_DIR = $(BUILD_DIR)/test
LLVM_BUILD_DIR = $(BUILD_DIR)/llvm
@ -121,13 +120,12 @@ CHECKCOPYRIGHT_MAIN = $(SCRIPT_SOURCES)/checkCopyright
#### End of declarations ####
ifeq (@IS_FACEBOOK_TREE@,yes)
EXTRA_DEPS = facebook
EXTRA_DEPS = facebook facebook/checkers facebook/checkers/graphql facebook/scripts
else
EXTRA_DEPS = opensource
endif
DEPENDENCIES = IR backend checkers eradicate harness \
facebook/checkers facebook/checkers/graphql facebook/scripts $(EXTRA_DEPS)
DEPENDENCIES = IR backend checkers eradicate harness $(EXTRA_DEPS)
# ocamlbuild command with options common to all build targets
OCAMLBUILD_BASE = rebuild $(OCAMLBUILD_OPTIONS) -j $(NCPU) $(addprefix -I , $(DEPENDENCIES))

Loading…
Cancel
Save