Permalink
Browse files

Run tests on `make all`.

Also make sure that the needed source files are present
when running the test suite.
  • Loading branch information...
1 parent 49d910f commit 51bb1f2387b2ae839637134bb72eda627b63ec85 @kaos kaos committed Mar 27, 2014
Showing with 8 additions and 3 deletions.
  1. +1 −1 .travis.yml
  2. +7 −2 Makefile
View
@@ -8,4 +8,4 @@ otp_release:
# since Travis is naughty and calls rebar get-deps behind our backs,
# 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"
View
@@ -2,7 +2,7 @@ ERL=erl
ERLC=erlc
REBAR=./rebar $(REBAR_ARGS)
-all: compile
+all: compile tests
compile: check-slex get-deps
@$(REBAR) compile
@@ -18,7 +18,7 @@ update-deps:
@$(REBAR) update-deps
.PHONY: tests
-tests:
+tests: src/erlydtl_parser.erl
@$(REBAR) eunit
check: tests dialyze
@@ -55,3 +55,8 @@ slex-compile:
shell:
@$(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

5 comments on commit 51bb1f2

Owner

kaos replied Mar 27, 2014

This was for a bullet in #154.

Contributor

essen replied Jul 7, 2014

Please don't do that this is a terrible idea as it makes it pretty much unworkable along Make based systems and break people's expectations when they type 'make'. The default target should only be for building the project.

Owner

kaos replied Jul 11, 2014

Thanks for the feedback Loïc, I'll consider reverting the test by default change.

Owner

kaos replied Jul 26, 2014

Fixed in commit 9b1a886.

Contributor

essen replied Jul 27, 2014

Thanks!

Please sign in to comment.