Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMickaël Rémond <mremond@process-one.net>2015-03-07 13:49:37 +0300
committerMickaël Rémond <mremond@process-one.net>2015-03-07 13:49:37 +0300
commitda468db64868a61f2a1b33d6611ac9c85ed76664 (patch)
tree23ef7dbae0c318a3eade2e5548764e1d334a1537 /test
parent8cf4ef0aac43bd0bec02efd9b17676f52d6955d9 (diff)
Fix Elixir tests failure detection
We now make sure we have no failure. Solves #438
Diffstat (limited to 'test')
-rw-r--r--test/ejabberd_SUITE.erl2
-rw-r--r--test/elixir_SUITE.erl11
2 files changed, 8 insertions, 5 deletions
diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl
index a2fa16483..9ab9c247e 100644
--- a/test/ejabberd_SUITE.erl
+++ b/test/ejabberd_SUITE.erl
@@ -1,6 +1,6 @@
%%%-------------------------------------------------------------------
%%% @author Evgeniy Khramtsov <ekhramtsov@process-one.net>
-%%% @copyright (C) 2013, Evgeniy Khramtsov
+%%% @copyright (C) 2002-2015, ProcessOne
%%% @doc
%%%
%%% @end
diff --git a/test/elixir_SUITE.erl b/test/elixir_SUITE.erl
index ec5dc5ec6..64480aef5 100644
--- a/test/elixir_SUITE.erl
+++ b/test/elixir_SUITE.erl
@@ -42,16 +42,19 @@ is_elixir_available() ->
undefined_function(?MODULE, Func, Args) ->
case lists:suffix(".exs", atom_to_list(Func)) of
- true ->
- 'Elixir.ExUnit':start([]),
- 'Elixir.Code':load_file(list_to_binary(filename:join(test_dir(), atom_to_list(Func)))),
- 'Elixir.ExUnit':run();
+ true ->
+ run_elixir_test(Func);
false ->
error_handler:undefined_function(?MODULE, Func, Args)
end;
undefined_function(Module, Func, Args) ->
error_handler:undefined_function(Module, Func,Args).
+run_elixir_test(Func) ->
+ 'Elixir.ExUnit':start([]),
+ 'Elixir.Code':load_file(list_to_binary(filename:join(test_dir(), atom_to_list(Func)))),
+ #{failures := 0} = 'Elixir.ExUnit':run().
+
test_dir() ->
{ok, CWD} = file:get_cwd(),
filename:join(CWD, "../../test").