[test] Do not use infer from PATH

Summary:
In several places the tests were using whatever 'infer' executable was
found in PATH, instead of the one build from the source to be tested.

Reviewed By: jeremydubreil

Differential Revision: D4065019

fbshipit-source-id: 9b65099
master
Josh Berdine 9 years ago committed by Facebook Github Bot
parent ea2428e3da
commit f45cf115e6

@ -131,7 +131,7 @@ cpp_infer_test:
$(MAKE) -C ./infer/tests/codetoanalyze/cpp/errors test
cpp_quandary_test:
make -C ./infer/tests/codetoanalyze/cpp/quandary test
$(MAKE) -C ./infer/tests/codetoanalyze/cpp/quandary test
java_checkers_test:
$(MAKE) -C ./infer/tests/codetoanalyze/java/checkers test

@ -41,6 +41,8 @@ from inferlib import config, issues, utils
ROOT_DIR = os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir)
INFER_BIN = os.path.join(ROOT_DIR, 'infer', 'bin', 'infer')
CLANG_BIN = os.path.join(ROOT_DIR, 'facebook-clang-plugins', 'clang',
'install', 'bin', 'clang')
@ -126,7 +128,7 @@ def run_analysis(clean_cmds, build_cmds, extra_check, should_fail, env=None):
extra_args = (build_cmd['infer_args']
if 'infer_args' in build_cmd
else [])
infer_cmd = (['infer', '-o', temp_out_dir] +
infer_cmd = ([INFER_BIN, '-o', temp_out_dir] +
extra_args +
['--'] +
build_cmd['compile'])

@ -17,4 +17,4 @@ compile:
clang $(OPTIONS) $(FILES)
capture:
infer -a capture --frontend-tests --cxx -- clang $(OPTIONS) $(FILES)
$(INFER_BIN) -a capture --frontend-tests --cxx -- clang $(OPTIONS) $(FILES)

@ -16,4 +16,4 @@ compile:
clang $(OPTIONS) $(FILES)
capture:
infer -a capture --frontend-tests --cxx --headers -- clang $(OPTIONS) $(FILES)
$(INFER_BIN) -a capture --frontend-tests --cxx --headers -- clang $(OPTIONS) $(FILES)

@ -86,8 +86,8 @@ compile:
clang $(OPTIONS) -fobjc-arc $(FILES_ARC)
capture:
infer -a capture --cxx --frontend-tests --continue --reactive -- clang $(OPTIONS) $(FILES_NOARC)
infer -a capture --cxx --frontend-tests -- clang $(OPTIONS) -fobjc-arc $(FILES_ARC)
$(INFER_BIN) -a capture --cxx --frontend-tests --continue --reactive -- clang $(OPTIONS) $(FILES_NOARC)
$(INFER_BIN) -a capture --cxx --frontend-tests -- clang $(OPTIONS) -fobjc-arc $(FILES_ARC)

@ -23,7 +23,7 @@ compile:
clang $(OPTIONS) $(FILES)
capture:
infer -a capture --cxx --frontend-tests --continue --reactive -- clang $(OPTIONS) $(FILES)
$(INFER_BIN) -a capture --cxx --frontend-tests --continue --reactive -- clang $(OPTIONS) $(FILES)

Loading…
Cancel
Save