|
|
|
# Copyright (c) 2017-present, Facebook, Inc.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
TESTS_DIR = ../..
|
|
|
|
|
[tests] stop sharing the root buck repo in java tests
Summary:
When multiple buck java tests use the same `buck-out` they sometimes fail. This isn't surprising, as they presumably clobber each other's output when running on the same files.
Since there is no reason to have this global, shared buck repo, create one for each test, inside the test directory. Also, clean up the Makefiles a bit -- they provide bogus compile targets, for example, and have mostly wrong source dependencies.
That done, remove the `testlock` crutch which enforces mutual exclusion between tests, from the buck/java tests.
I do not understand why the buck clang tests can share the global repo without failure, but there you go.
Reviewed By: jvillard
Differential Revision: D15579133
fbshipit-source-id: 7eff79173
6 years ago
|
|
|
BUCK_TARGET = //module2:module2
|
|
|
|
INFERPRINT_OPTIONS = --issues-tests
|
|
|
|
CLEAN_EXTRA = buck-out
|
|
|
|
SOURCES = $(shell find . -name '*.java')
|
|
|
|
|
|
|
|
include $(TESTS_DIR)/java.make
|
|
|
|
include $(TESTS_DIR)/infer.make
|
|
|
|
|
|
|
|
infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
|
[tests] stop sharing the root buck repo in java tests
Summary:
When multiple buck java tests use the same `buck-out` they sometimes fail. This isn't surprising, as they presumably clobber each other's output when running on the same files.
Since there is no reason to have this global, shared buck repo, create one for each test, inside the test directory. Also, clean up the Makefiles a bit -- they provide bogus compile targets, for example, and have mostly wrong source dependencies.
That done, remove the `testlock` crutch which enforces mutual exclusion between tests, from the buck/java tests.
I do not understand why the buck clang tests can share the global repo without failure, but there you go.
Reviewed By: jvillard
Differential Revision: D15579133
fbshipit-source-id: 7eff79173
6 years ago
|
|
|
$(QUIET)$(REMOVE_DIR) buck-out && \
|
|
|
|
$(call silent_on_success,Testing Buck Java cross module integration,\
|
|
|
|
INFER_BIN=$(INFER_BIN) \
|
|
|
|
$(INFER_BIN) --results-dir $(CURDIR)/infer-out -- \
|
|
|
|
$(BUCK) build --no-cache $(BUCK_TARGET))
|