Skip to content

Commit

Permalink
make eunit detection a bit more robust
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
  • Loading branch information
ericbmerritt authored and jwilberding committed May 2, 2012
1 parent 9bf75f7 commit bdd2437
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sin_task_eunit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,14 @@ filter_modules(Config, Modules) ->
sin_state:state(), [sin_file_info:mod()]) -> ok.
run_module_tests(Config, State0, AllModules) ->
lists:foldl(
fun(#module{name=Name, tags=Tags}, State1) ->
case sets:is_element(eunit, Tags) of
fun(#module{name=PreName}, State1) ->
Name = case PreName of
{Name0, _} ->
Name0;
Name0 ->
Name0
end,
case lists:member({test, 0}, Name:module_info(exports)) of
true ->
sin_log:normal(Config, "testing ~p", [Name]),
case eunit:test(Name, [{verbose, Config:match(verbose, false)}]) of
Expand Down

0 comments on commit bdd2437

Please sign in to comment.