Browse Source

Run tests on `make all`.

Also make sure that the needed source files are present
when running the test suite.
Andreas Stenius 11 years ago
parent
commit
51bb1f2387
2 changed files with 8 additions and 3 deletions
  1. 1 1
      .travis.yml
  2. 7 2
      Makefile

+ 1 - 1
.travis.yml

@@ -8,4 +8,4 @@ otp_release:
 
 
 # since Travis is naughty and calls rebar get-deps behind our backs,
 # since Travis is naughty and calls rebar get-deps behind our backs,
 # we'll have to clean it up and build merl our selves..
 # we'll have to clean it up and build merl our selves..
-script: "make -C deps/merl && make all tests"
+script: "make -C deps/merl && make tests"

+ 7 - 2
Makefile

@@ -2,7 +2,7 @@ ERL=erl
 ERLC=erlc
 ERLC=erlc
 REBAR=./rebar $(REBAR_ARGS)
 REBAR=./rebar $(REBAR_ARGS)
 
 
-all: compile
+all: compile tests
 
 
 compile: check-slex get-deps
 compile: check-slex get-deps
 	@$(REBAR) compile
 	@$(REBAR) compile
@@ -18,7 +18,7 @@ update-deps:
 	@$(REBAR) update-deps
 	@$(REBAR) update-deps
 
 
 .PHONY: tests
 .PHONY: tests
-tests:
+tests: src/erlydtl_parser.erl
 	@$(REBAR) eunit
 	@$(REBAR) eunit
 
 
 check: tests dialyze
 check: tests dialyze
@@ -55,3 +55,8 @@ slex-compile:
 
 
 shell:
 shell:
 	@$(ERL) -pz ebin deps/*/ebin
 	@$(ERL) -pz ebin deps/*/ebin
+
+
+# this file must exist for rebar eunit to work
+# but is only built when running rebar compile
+src/erlydtl_parser.erl: compile