|
|
|
# Copyright (c) 2016-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
|
|
|
|
INFER_TARGET = $(BUCK_TARGET)_infer
|
[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
|
|
|
INFERPRINT_OPTIONS = --issues-tests
|
|
|
|
SOURCES = $(shell find . -name '*.java')
|
|
|
|
CLEAN_EXTRA = buck-out
|
|
|
|
INFER_OUT = buck-out/gen/module2/module2_infer/infer_out
|
|
|
|
JSON_REPORT = $(INFER_OUT)/report.json
|
|
|
|
|
|
|
|
include $(TESTS_DIR)/java.make
|
|
|
|
include $(TESTS_DIR)/infer.make
|
|
|
|
|
[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
|
|
|
$(JSON_REPORT): $(JAVA_DEPS) $(SOURCES) $(MAKEFILE_LIST)
|
|
|
|
$(QUIET)$(REMOVE_DIR) buck-out && \
|
|
|
|
$(call silent_on_success,Testing Buck genrule for Java integration,\
|
[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_BIN)" $(BUCK) build --no-cache $(INFER_TARGET))
|
|
|
|
$(QUIET)touch $@
|
|
|
|
|
[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
|
|
|
issues.exp.test$(TEST_SUFFIX): $(JSON_REPORT) $(INFER_BIN)
|
|
|
|
$(QUIET)$(INFER_BIN) report -q \
|
[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
|
|
|
$(INFERPRINT_OPTIONS) $@ --from-json-report $(JSON_REPORT)
|