From f3f8f29920ace62d518caf76ae70d9731326ba4b Mon Sep 17 00:00:00 2001 From: David Kubecka Date: Sun, 22 Mar 2015 16:04:05 +0100 Subject: [PATCH] Improve test targets in Makefile - enable running eunit and retest tests separately - add neccessary dependencies to each test target so that one can just do 'make test' without recompiling changed files manually - enable overwriting retest's log level - use retest's own Makefile instead of invoking rebar manually --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 886f5c234..ac1cb7e59 100644 --- a/Makefile +++ b/Makefile @@ -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 RETEST=$(PWD)/deps/retest/retest OTPVSNCMD='io:fwrite("~s",[rebar_utils:otp_release()]), halt().' OTPVSN=$(shell erl -pa ebin/ -noshell -eval $(OTPVSNCMD)) PLT_FILENAME=~/.dialyzer_rebar_$(OTPVSN)_plt +LOG_LEVEL?=debug all: ./bootstrap @@ -64,10 +65,14 @@ binary: clean all 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 - @$(RETEST) -v inttest + +test_inttest: all deps + @$(RETEST) -l $(LOG_LEVEL) inttest travis: clean debug xref clean all deps test