Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Improve test targets in Makefile
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
David Kubecka committed Mar 26, 2015
1 parent 02de46d commit f3f8f29
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions 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
Expand Down Expand Up @@ -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

0 comments on commit f3f8f29

Please sign in to comment.