[buck] disable buckd systematically

Summary:
It's already turned of systematically for the Java integration, this just
generalises it. The Buck daemon seems to cause issues with infer from time to
time that are hard to debug.

Reviewed By: jeremydubreil

Differential Revision: D7400068

fbshipit-source-id: f05ee07
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent a21644685f
commit 63e04a55a0

@ -72,10 +72,6 @@ def prepare_build(args):
logging.error('Could not find infer')
raise e
# disable the Buck daemon as changes in the Buck config
# may be missed otherwise
os.environ['NO_BUCKD'] = '1'
# Create a script to be called by buck
infer_script = None
with tempfile.NamedTemporaryFile(delete=False,

@ -544,6 +544,8 @@ let run_prologue mode =
anyway, pretend that we are not called from another make to prevent make falling back to a
mono-threaded execution. *)
Unix.unsetenv "MAKEFLAGS" ;
(* disable the Buck daemon as changes in the Buck or infer config may be missed otherwise *)
Unix.putenv ~key:"NO_BUCKD" ~data:"1" ;
()

@ -21,7 +21,6 @@ include $(TESTS_DIR)/infer.make
infer-out/report.json: $(CLANG_DEPS) $(SOURCES)
$(QUIET)cd $(SOURCE_DIR) && \
$(call silent_on_success,Testing Buck Clang compilation database integration,\
NO_BUCKD=1 \
$(INFER_BIN) -a $(ANALYZER) $(INFER_OPTIONS) -o $(CURDIR)/$(@D) \
--buck-compilation-database no-deps \
-- $(BUCK) build --no-cache '//clang_compilation_database:Hel lo#default' @clang_compilation_database/buck_target_hello_test.txt)

@ -22,13 +22,13 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(call silent_on_success,Compiling Buck Java tests,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(BUCK) build --deep --no-cache $(BUCK_TARGET))
infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck Java integration,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) $(INFER_OPTIONS) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --deep --no-cache $(BUCK_TARGET))

@ -19,13 +19,13 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(call silent_on_success,Compiling Buck cross module test tests,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(BUCK) build --no-cache $(BUCK_TARGET))
infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck Java cross module integration,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET))

@ -20,12 +20,11 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)$(call silent_on_success,Compiling Buck flavors tests,\
NO_BUCKD=1 $(BUCK) build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck flavors integration,\
NO_BUCKD=1 \
$(INFER_BIN) $(INFER_OPTIONS) capture --flavors --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET) &&\
$(INFER_BIN) $(INFER_OPTIONS) --merge analyze)

@ -20,18 +20,16 @@ include $(TESTS_DIR)/base.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)$(call silent_on_success,Compiling Buck flavors tests,\
NO_BUCKD=1 $(BUCK) build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))
differences.exp.test: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Running Buck flavors capture a first time,\
NO_BUCKD=1 \
$(INFER_BIN) $(INFER_OPTIONS) capture --flavors --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET) && \
find buck-out/gen/src/infer-out-* -type f | xargs cat | $(SHASUM) > capture_hash-1.sha)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Running Buck flavors capture a second time,\
NO_BUCKD=1 \
$(INFER_BIN) $(INFER_OPTIONS) capture --flavors --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET) && \
find buck-out/gen/src/infer-out-* -type f | xargs cat | $(SHASUM) > capture_hash-2.sha)

@ -20,11 +20,10 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(SOURCES)
$(QUIET)$(call silent_on_success,Compiling Buck flavors tests,\
NO_BUCKD=1 $(BUCK) build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))
infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing infer-run Buck flavors integration,\
NO_BUCKD=1 \
$(INFER_BIN) $(INFER_OPTIONS) run --flavors --results-dir $(CURDIR)/infer-out --reactive -- \
$(BUCK) build --no-cache $(BUCK_TARGET))

@ -27,7 +27,7 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(call silent_on_success,Compiling Buck genrule for Java sources,\
NO_BUCKD=1 $(BUCK) build --no-cache $(BUCK_TARGET))
$(BUCK) build --no-cache $(BUCK_TARGET))
.PHONY: genrule
genrule: $(JSON_REPORT)
@ -37,7 +37,7 @@ $(JSON_REPORT): $(JAVA_DEPS) $(JAVA_SOURCE_FILES) $(MAKEFILE_LIST)
$(QUIET)cd $(ROOT_DIR) && \
$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing Buck genrule for Java integration,\
INFER_BIN="$(INFER_BIN)" NO_BUCKD=1 $(BUCK) build --no-cache $(INFER_TARGET))
INFER_BIN="$(INFER_BIN)" $(BUCK) build --no-cache $(INFER_TARGET))
$(QUIET)touch $@
report.json: $(JSON_REPORT) $(MAKEFILE_LIST)

@ -18,13 +18,13 @@ include $(TESTS_DIR)/infer.make
$(OBJECTS): $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(call silent_on_success,Compiling thread-safety trace tests,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(BUCK) build --no-cache $(BUCK_TARGET))
infer-out/report.json: $(JAVA_DEPS) $(JAVA_SOURCE_FILES)
$(QUIET)cd $(ROOT_DIR) && \
$(REMOVE_DIR) buck-out && \
$(call silent_on_success,Testing thread-safety trace tests with Buck,\
INFER_BIN=$(INFER_BIN) NO_BUCKD=1 \
INFER_BIN=$(INFER_BIN) \
$(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \
$(BUCK) build --no-cache $(BUCK_TARGET))

Loading…
Cancel
Save