25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Catch exception from Elixir.ExUnit.Server.cases_loaded

This commit is contained in:
Paweł Chmielowski 2017-06-14 14:56:42 +02:00
parent 58b9077b51
commit 6353a06a5d

View File

@ -99,7 +99,7 @@ run_elixir_test(Func) ->
'Elixir.Code':load_file(list_to_binary(filename:join(test_dir(), atom_to_list(Func)))), 'Elixir.Code':load_file(list_to_binary(filename:join(test_dir(), atom_to_list(Func)))),
%% I did not use map syntax, so that this file can still be build under R16 %% I did not use map syntax, so that this file can still be build under R16
'Elixir.ExUnit.Server':cases_loaded(), catch 'Elixir.ExUnit.Server':cases_loaded(),
ResultMap = 'Elixir.ExUnit':run(), ResultMap = 'Elixir.ExUnit':run(),
case maps:find(failures, ResultMap) of case maps:find(failures, ResultMap) of
{ok, 0} -> {ok, 0} ->