[make] Silence expected warnings and other spew from tests

Reviewed By: jvillard

Differential Revision: D4135537

fbshipit-source-id: c29affe
master
Josh Berdine 8 years ago committed by Facebook Github Bot
parent 7e4710004e
commit 426f29fb3c

@ -125,9 +125,13 @@ frontend_replace: $(DIRECT_TESTS_REPLACE)
define gen_direct_test_rule define gen_direct_test_rule
.PHONY: $(1) .PHONY: $(1)
$(1): infer $(1): infer
$(MAKE) -C \ ($(MAKE) -C \
$(INFER_DIR)/tests/codetoanalyze/$(shell printf $(1) | cut -f 1 -d _)/$(shell printf $(1) | cut -f 2 -d _) \ $(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 endef
$(foreach test,$(DIRECT_TESTS) $(DIRECT_TESTS_REPLACE),\ $(foreach test,$(DIRECT_TESTS) $(DIRECT_TESTS_REPLACE),\
@ -179,7 +183,8 @@ toplevel: infer
.PHONY: inferScriptMode_test .PHONY: inferScriptMode_test
inferScriptMode_test: toplevel 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 .PHONY: test
test: test_build ocaml_unit_test buck_test inferTraceBugs_test inferScriptMode_test test: test_build ocaml_unit_test buck_test inferTraceBugs_test inferScriptMode_test

@ -165,10 +165,6 @@ def main():
' '.join(map(utils.decode, sys.argv))) ' '.join(map(utils.decode, sys.argv)))
logging.info('Path to infer script %s (%s)', utils.decode(__file__), logging.info('Path to infer script %s (%s)', utils.decode(__file__),
os.path.realpath(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())) logging.info('Platform: %s', utils.decode(platform.platform()))
def log_getenv(k): def log_getenv(k):

@ -198,6 +198,7 @@ let () =
let build_mode = match build_cmd with path :: _ -> build_mode_of_string path | [] -> Analyze in let build_mode = match build_cmd with path :: _ -> build_mode_of_string path | [] -> Analyze in
remove_results_dir build_mode ; remove_results_dir build_mode ;
create_results_dir () ; create_results_dir () ;
if Config.is_originator then L.out "%s@\n" Config.version_string ;
touch_start_file () ; touch_start_file () ;
capture build_cmd build_mode ; capture build_cmd build_mode ;
analyze build_mode ; analyze build_mode ;

@ -120,6 +120,7 @@ val trace_absarray : bool
val undo_join : bool val undo_join : bool
val unsafe_unret : string val unsafe_unret : string
val use_jar_cache : bool val use_jar_cache : bool
val version_string : string
val weak : string val weak : string
val whitelisted_cpp_methods : string list list val whitelisted_cpp_methods : string list list
val wrappers_dir : string val wrappers_dir : string

Loading…
Cancel
Save