Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions libs/etest/src/eunit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,16 @@ module_tests(Module, [_ | Tail], Acc) ->
module_tests(Module, Tail, Acc).

report(Progress, Identification) ->
{module, Module} = lists:keyfind(module, 1, Identification),
{test_case, TestCase} = lists:keyfind(test_case, 1, Identification),
ModuleString =
case lists:keyfind(module, 1, Identification) of
false -> "";
{module, Module} -> io_lib:format("~s:", [Module])
end,
TestCaseString =
case lists:keyfind(test_case, 1, Identification) of
false -> "";
{test_case, TestCase} -> TestCase
end,
LineString =
case lists:keyfind(line, 1, Identification) of
false -> "";
Expand All @@ -239,7 +247,9 @@ report(Progress, Identification) ->
{exit, Reason} -> io_lib:format(":FAIL:exited with ~p", [Reason]);
timeout -> ":FAIL:timeout"
end,
io:format("~s:~s ~s~s~s\n", [Module, LineString, TestCase, TitleString, ProgressString]).
io:format("~s:~s ~s~s~s\n", [
ModuleString, LineString, TestCaseString, TitleString, ProgressString
]).

run_test(Identification, TestFun, #state{total = Total} = State0) ->
report(start, Identification),
Expand Down
Loading