Merge pull request #466 from kejv/improve-makefile

Improve test targets in Makefile
This commit is contained in:
Fred Hebert 2015-03-26 09:04:51 -07:00
commit 9b69740fa1

View file

@ -1,10 +1,11 @@
.PHONY: clean dialyzer_warnings xref_warnings deps test .PHONY: clean dialyzer_warnings xref_warnings deps test test_eunit test_inttest
REBAR=$(PWD)/rebar REBAR=$(PWD)/rebar
RETEST=$(PWD)/deps/retest/retest RETEST=$(PWD)/deps/retest/retest
OTPVSNCMD='io:fwrite("~s",[rebar_utils:otp_release()]), halt().' OTPVSNCMD='io:fwrite("~s",[rebar_utils:otp_release()]), halt().'
OTPVSN=$(shell erl -pa ebin/ -noshell -eval $(OTPVSNCMD)) OTPVSN=$(shell erl -pa ebin/ -noshell -eval $(OTPVSNCMD))
PLT_FILENAME=~/.dialyzer_rebar_$(OTPVSN)_plt PLT_FILENAME=~/.dialyzer_rebar_$(OTPVSN)_plt
LOG_LEVEL?=debug
all: all:
./bootstrap ./bootstrap
@ -64,10 +65,14 @@ binary: clean all
deps: deps:
@REBAR_EXTRA_DEPS=1 ./rebar get-deps @REBAR_EXTRA_DEPS=1 ./rebar get-deps
@(cd deps/retest && $(REBAR) compile escriptize) $(MAKE) -C deps/retest
test: test: test_eunit test_inttest
test_eunit: all
@$(REBAR) eunit @$(REBAR) eunit
@$(RETEST) -v inttest
test_inttest: all deps
@$(RETEST) -l $(LOG_LEVEL) inttest
travis: clean debug xref clean all deps test travis: clean debug xref clean all deps test