diff --git a/Makefile b/Makefile index 4965a717f..80a48a1d5 100644 --- a/Makefile +++ b/Makefile @@ -125,9 +125,13 @@ frontend_replace: $(DIRECT_TESTS_REPLACE) define gen_direct_test_rule .PHONY: $(1) $(1): infer - $(MAKE) -C \ + ($(MAKE) -C \ $(INFER_DIR)/tests/codetoanalyze/$(shell printf $(1) | cut -f 1 -d _)/$(shell printf $(1) | cut -f 2 -d _) \ - $(shell printf $(1) | cut -f 3 -d _) + $(shell printf $(1) | cut -f 3 -d _) \ + 3>&1 1>&2- 2>&3- ) \ + | grep -v "warning: ignoring old commands for target" \ + | grep -v "warning: overriding commands for target" \ + ; exit $$$${PIPESTATUS[0]} endef $(foreach test,$(DIRECT_TESTS) $(DIRECT_TESTS_REPLACE),\ @@ -179,7 +183,8 @@ toplevel: infer .PHONY: inferScriptMode_test inferScriptMode_test: toplevel - INFER_REPL_BINARY=ocaml $(SCRIPT_DIR)/infer_repl $(INFER_DIR)/tests/repl/infer_batch_script.ml + $(call silent_on_success,\ + INFER_REPL_BINARY=ocaml $(SCRIPT_DIR)/infer_repl $(INFER_DIR)/tests/repl/infer_batch_script.ml) .PHONY: test test: test_build ocaml_unit_test buck_test inferTraceBugs_test inferScriptMode_test diff --git a/infer/lib/python/infer.py b/infer/lib/python/infer.py index d84e614c9..506c91b52 100755 --- a/infer/lib/python/infer.py +++ b/infer/lib/python/infer.py @@ -165,10 +165,6 @@ def main(): ' '.join(map(utils.decode, sys.argv))) logging.info('Path to infer script %s (%s)', utils.decode(__file__), os.path.realpath(utils.decode(__file__))) - if not args.buck: - # Should not print the Infer version when Infer is run by Buck. - # Buck reads the whole stderr output to compute the target key - logging.info(analyze.get_infer_version()) logging.info('Platform: %s', utils.decode(platform.platform())) def log_getenv(k): diff --git a/infer/src/backend/infer.ml b/infer/src/backend/infer.ml index b80680d5e..766f4f66e 100644 --- a/infer/src/backend/infer.ml +++ b/infer/src/backend/infer.ml @@ -198,6 +198,7 @@ let () = let build_mode = match build_cmd with path :: _ -> build_mode_of_string path | [] -> Analyze in remove_results_dir build_mode ; create_results_dir () ; + if Config.is_originator then L.out "%s@\n" Config.version_string ; touch_start_file () ; capture build_cmd build_mode ; analyze build_mode ; diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 4eda3b750..8934d91a2 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -120,6 +120,7 @@ val trace_absarray : bool val undo_join : bool val unsafe_unret : string val use_jar_cache : bool +val version_string : string val weak : string val whitelisted_cpp_methods : string list list val wrappers_dir : string