@ -165,16 +165,11 @@ endif
ocaml_unit_test : test_build
ocaml_unit_test : test_build
$( call silent_on_success,$( BUILD_DIR) /test/infer/unit/inferunit.byte)
$( call silent_on_success,$( BUILD_DIR) /test/infer/unit/inferunit.byte)
DIRECT_TESTS_REPLACE = $( patsubst %_frontend,%_frontend_replace,$( filter %_frontend,$( DIRECT_TESTS) ) )
d e f i n e s i l e n c e _ m a k e
d e f i n e s i l e n c e _ m a k e
( $( 1) 2> >( grep -v "warning: \(ignoring old\|overriding\) \(commands\|recipe\) for target" ) \
( $( 1) 2> >( grep -v "warning: \(ignoring old\|overriding\) \(commands\|recipe\) for target" ) \
; exit $$ { PIPESTATUS[ 0] } )
; exit $$ { PIPESTATUS[ 0] } )
e n d e f
e n d e f
.PHONY : frontend_replace
frontend_replace : $( DIRECT_TESTS_REPLACE )
.PHONY : $( DIRECT_TESTS :%=direct_ %_test )
.PHONY : $( DIRECT_TESTS :%=direct_ %_test )
$(DIRECT_TESTS : %=direct_ %_test ): infer
$(DIRECT_TESTS : %=direct_ %_test ): infer
@$( call silence_make,\
@$( call silence_make,\
@ -196,6 +191,13 @@ $(DIRECT_TESTS:%=direct_%_clean):
$( INFER_DIR) /tests/codetoanalyze/$( shell printf $@ | cut -f 2 -d _) /$( shell printf $@ | cut -f 3 -d _) \
$( INFER_DIR) /tests/codetoanalyze/$( shell printf $@ | cut -f 2 -d _) /$( shell printf $@ | cut -f 3 -d _) \
clean)
clean)
.PHONY : $( DIRECT_TESTS :%=direct_ %_replace )
$(DIRECT_TESTS : %=direct_ %_replace ): infer
@$( call silence_make,\
$( MAKE) -C \
$( INFER_DIR) /tests/codetoanalyze/$( shell printf $@ | cut -f 2 -d _) /$( shell printf $@ | cut -f 3 -d _) \
replace)
.PHONY : direct_tests
.PHONY : direct_tests
direct_tests : $( DIRECT_TESTS :%=direct_ %_test )
direct_tests : $( DIRECT_TESTS :%=direct_ %_test )
@ -207,9 +209,6 @@ build_genrule_print: build_buck_print
build_waf_test : build_make_test
build_waf_test : build_make_test
build_waf_print : build_make_print
build_waf_print : build_make_print
.PHONY : print_direct_tests
print_direct_tests : $( DIRECT_TESTS :%=direct_ %_print )
.PHONY : $( BUILD_SYSTEMS_TESTS :%=build_ %_test )
.PHONY : $( BUILD_SYSTEMS_TESTS :%=build_ %_test )
$(BUILD_SYSTEMS_TESTS : %=build_ %_test ): infer
$(BUILD_SYSTEMS_TESTS : %=build_ %_test ): infer
@$( call silence_make,\
@$( call silence_make,\
@ -225,14 +224,16 @@ $(BUILD_SYSTEMS_TESTS:%=build_%_clean):
@$( call silence_make,\
@$( call silence_make,\
$( MAKE) -C $( INFER_DIR) /tests/build_systems/$( patsubst build_%_clean,%,$@ ) clean)
$( MAKE) -C $( INFER_DIR) /tests/build_systems/$( patsubst build_%_clean,%,$@ ) clean)
.PHONY : $( BUILD_SYSTEMS_TESTS :%=build_ %_replace )
$(BUILD_SYSTEMS_TESTS : %=build_ %_replace ): infer
@$( call silence_make,\
$( MAKE) -C $( INFER_DIR) /tests/build_systems/$( patsubst build_%_replace,%,$@ ) replace)
.PHONY : build_systems_tests
.PHONY : build_systems_tests
build_systems_tests : $( BUILD_SYSTEMS_TESTS :%=build_ %_test )
build_systems_tests : $( BUILD_SYSTEMS_TESTS :%=build_ %_test )
.PHONY : print_build_systems_tests
print_build_systems_tests : $( BUILD_SYSTEMS_TESTS :%=build_ %_print )
.PHONY : endtoend_test
.PHONY : endtoend_test
endtoend_test : print_direct_tests print_build_systems_tests
endtoend_test : $( BUILD_SYSTEMS_TESTS :%=build_ %_print ) $( DIRECT_TESTS :%=direct_ %_print )
# pre-compute all the results first so that the test failures show up near the end of the output
# pre-compute all the results first so that the test failures show up near the end of the output
$( MAKE) direct_tests build_systems_tests
$( MAKE) direct_tests build_systems_tests
@ -295,12 +296,7 @@ endif
quick-test : test_build ocaml_unit_test
quick-test : test_build ocaml_unit_test
.PHONY : test -replace
.PHONY : test -replace
test-replace :
test-replace : $( BUILD_SYSTEMS_TESTS :%=build_ %_replace ) $( DIRECT_TESTS :%=direct_ %_replace )
@$( MAKE) -k endtoend_test || true
@for file in $$ ( find $( INFER_DIR) /tests -name "*.exp.test" ) ; do \
mv -f $$ file $$ ( dirname $$ file) /$$ ( basename -s .exp.test $$ file) .exp; done
@for file in $$ ( find $( INFER_DIR) /tests -name "*.test.dot" ) ; do \
mv -f $$ file $$ ( dirname $$ file) /$$ ( basename -s .test.dot $$ file) .dot; done
.PHONY : uninstall
.PHONY : uninstall
uninstall :
uninstall :