diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index cd9435813..21a9a477e 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -584,11 +584,6 @@ let run_prologue mode = if Config.debug_mode then L.environment_info "Driver mode:@\n%a@." pp_mode mode ; if CLOpt.is_originator then ( if Config.dump_duplicate_symbols then reset_duplicates_file () ; - (* infer might be called from a Makefile and itself uses `make` to run the analysis in parallel, - but cannot communicate with the parent make command. Since infer won't interfere with them - 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" ) ; () diff --git a/infer/tests/build_systems/make/Makefile b/infer/tests/build_systems/make/Makefile index 760c380cd..e337ffb6b 100644 --- a/infer/tests/build_systems/make/Makefile +++ b/infer/tests/build_systems/make/Makefile @@ -14,6 +14,7 @@ include $(TESTS_DIR)/clang.make infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(QUIET)$(call silent_on_success,Testing make clang and javac integration,\ - $(TESTLOCK) $(INFER_BIN) --dump-duplicate-symbols --project-root $(TESTS_DIR) -- \ - make -C ../codetoanalyze/make clean all) + $(TESTLOCK) sh -c "$(MAKE) -C ../codetoanalyze/make clean && \ + $(INFER_BIN) --dump-duplicate-symbols --project-root $(TESTS_DIR) -- \ + $(MAKE) -C ../codetoanalyze/make all") $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) diff --git a/infer/tests/build_systems/utf8_in_pwd/Makefile b/infer/tests/build_systems/utf8_in_pwd/Makefile index b40058421..892b744b3 100644 --- a/infer/tests/build_systems/utf8_in_pwd/Makefile +++ b/infer/tests/build_systems/utf8_in_pwd/Makefile @@ -92,8 +92,7 @@ infer-out-javac/report.json: $(JAVA_DEPS) $(JAVAC_DIR) infer-out-make/report.json: $(CLANG_DEPS) $(MAKE_DIR) $(QUIET)cd $(MAKE_DIR) && \ $(call silent_on_success,Testing Infer/make is immune to UTF-8 in PWD,\ - $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- \ - make clean all) + $(TESTLOCK) sh -c "$(MAKE) clean && $(INFER_BIN) --results-dir $(CURDIR)/$(@D) -- $(MAKE) all") issues-%.exp.test: infer-out-%/report.json $(INFER_BIN) $(QUIET)$(INFER_BIN) report -q $(INFERPRINT_OPTIONS) $@ \