diff --git a/infer/tests/build_systems/buck/Makefile b/infer/tests/build_systems/buck/Makefile index 01fc2fdf8..8e59dcc18 100644 --- a/infer/tests/build_systems/buck/Makefile +++ b/infer/tests/build_systems/buck/Makefile @@ -20,14 +20,18 @@ include $(TESTS_DIR)/java.make include $(TESTS_DIR)/base.make $(JAR_OUTPUT): $(JAVA_SOURCE_FILES) - NO_BUCKD=1 buck build --no-cache //infer/tests/codetoanalyze/java/infer:compile + $(call silent_on_success,\ + cd $(ROOT_DIR) && \ + INFER_BIN=$(INFER_BIN) NO_BUCKD=1 buck build --no-cache //infer/tests/codetoanalyze/java/infer:compile) .PHONY: genrule genrule: $(JAR_OUTPUT) - NO_BUCKD=1 buck build --no-cache //infer/tests/codetoanalyze/java/infer:run_infer + $(call silent_on_success,\ + cd $(ROOT_DIR) && \ + INFER_BIN=$(INFER_BIN) NO_BUCKD=1 buck build --no-cache //infer/tests/codetoanalyze/java/infer:run_infer) infer-out/report.json: genrule $(INFER_BIN) $(JAVA_SOURCE_FILES) $(call silent_on_success,\ cd $(ROOT_DIR) && \ - NO_BUCKD=1 $(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ + INFER_BIN=$(INFER_BIN) NO_BUCKD=1 $(INFER_BIN) -a $(ANALYZER) --results-dir $(CURDIR)/infer-out -- \ buck build --no-cache //infer/tests/codetoanalyze/java/infer:compile) diff --git a/infer/tests/codetoanalyze/java/infer/BUCK b/infer/tests/codetoanalyze/java/infer/BUCK index c62ffaa0c..b06ac2649 100644 --- a/infer/tests/codetoanalyze/java/infer/BUCK +++ b/infer/tests/codetoanalyze/java/infer/BUCK @@ -1,5 +1,7 @@ # TODO: this file exists only to support buck integration in infer/tests/build_systems/build_integration_tests.py +import os + sources = glob(['**/*.java']) java_library( @@ -23,7 +25,7 @@ genrule( srcs = sources, out = 'infer-out', bash = ' '.join([ - 'infer', + os.getenv('INFER_BIN', 'infer'), '--sourcepath', '$SRCDIR', '--classpath',