Skip to content

Commit

Permalink
Refactor eunit tests for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredmorrow committed Feb 1, 2012
1 parent caa0b64 commit 8c8db7b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Expand Up @@ -16,11 +16,20 @@ clean:
distclean: clean devclean relclean ballclean
./rebar delete-deps


TEST_LOG_FILE := eunit.log
testclean:
@rm $(TEST_LOG_FILE)

# Test each dependency individually in its own VM
test: deps compile
$(foreach dep, $(wildcard deps/*), ./rebar eunit app=$(notdir $(dep)) || exit 1;)
test: testclean
@$(foreach dep, \
$(wildcard deps/*), \
./rebar eunit app=$(notdir $(dep)) \
|| echo "Eunit: $(notdir $(dep)) FAILED" >> $(TEST_LOG_FILE);)
@test -s $(TEST_LOG_FILE) && cat $(TEST_LOG_FILE)
./rebar eunit skip_deps=true

@exit `wc -l < $(TEST_LOG_FILE)`

##
## Release targets
Expand Down

0 comments on commit 8c8db7b

Please sign in to comment.