Add make target for eunit tests

This commit is contained in:
Correl Roush 2014-08-27 23:27:50 -04:00
parent 8d448c20c7
commit 48aac66dc4
4 changed files with 28 additions and 4 deletions

View file

@ -1,6 +1,15 @@
PROJECT = riichi
DEPS = reloader
DEPS = reloader eunit_formatters
dep_reloader = git https://github.com/oinksoft/reloader.git master
dep_eunit_formatters = git https://github.com/seancribbs/eunit_formatters.git master
include erlang.mk
ifneq ($(wildcard test/),)
ebin/$(PROJECT).app:: $(shell find test -type f -name \*_tests.erl)
$(if $(strip $?),$(call compile_erl,$?))
endif
eunit: clean deps app
$(gen_verbose) erl -noshell -pa ebin -eval 'eunit:test({application, $(PROJECT)}, [no_tty, {report, {eunit_progress, [colored, profile]}}])' -s init stop

17
test/eunit_SUITE.erl Normal file
View file

@ -0,0 +1,17 @@
-module(eunit_SUITE).
-include_lib("common_test/include/ct.hrl").
%% ct.
-export([all/0]).
%% Tests.
-export([eunit/1]).
%% ct.
all() ->
[eunit].
eunit(_) ->
ok = eunit:test({application, riichi}).

View file

@ -1,6 +1,6 @@
-module(riichi_tests).
-include("riichi.hrl").
-include("../include/riichi.hrl").
-include_lib("eunit/include/eunit.hrl").
valid_tile_dragon_test_() ->

View file

@ -1,7 +1,5 @@
-module(riichi_yaku_tests).
-compile(export_all).
-include("../include/riichi.hrl").
-include_lib("eunit/include/eunit.hrl").