|
|
|
# Copyright (c) 2018-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 = ../..
|
|
|
|
ROOT_DIR = $(TESTS_DIR)/../..
|
|
|
|
|
|
|
|
TARGET = //src:target
|
|
|
|
SOURCES = src/UsingJavacJar.java
|
|
|
|
OBJECTS = buck-out/gen/src/lib__target__output/target.jar
|
|
|
|
BUCKCONFIG = .buckconfig
|
|
|
|
INFER_OPTIONS = --eradicate-only
|
|
|
|
INFERPRINT_OPTIONS = --issues-tests
|
|
|
|
CLEAN_EXTRA = buck-out
|
|
|
|
|
|
|
|
include $(TESTS_DIR)/infer.make
|
|
|
|
|
|
|
|
$(OBJECTS): $(SOURCES) $(BUCKCONFIG)
|
|
|
|
$(TESTLOCK) $(BUCK) build --config tools.javac_jar= $(TARGET)
|
|
|
|
|
|
|
|
infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(BUCKCONFIG)
|
[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 integration with javac_jar,\
|
|
|
|
INFER_BIN=$(INFER_BIN) \
|
[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
|
|
|
$(INFER_BIN) $(INFER_OPTIONS) -- $(BUCK) build $(TARGET))
|