aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/src/eunit_surefire.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eunit/src/eunit_surefire.erl')
-rw-r--r--lib/eunit/src/eunit_surefire.erl18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl
index eb994a990a..dfb08c90b2 100644
--- a/lib/eunit/src/eunit_surefire.erl
+++ b/lib/eunit/src/eunit_surefire.erl
@@ -100,16 +100,10 @@ terminate({ok, _Data}, St) ->
XmlDir = St#state.xmldir,
write_report(TestSuite, XmlDir),
ok;
-terminate({error, Reason}, _St) ->
- io:fwrite("Internal error: ~P.\n", [Reason, 25]),
- sync_end(error).
-
-sync_end(Result) ->
- receive
- {stop, Reference, ReplyTo} ->
- ReplyTo ! {result, Reference, Result},
- ok
- end.
+terminate({error, _Reason}, _St) ->
+ %% Don't report any errors here, since eunit_tty takes care of that.
+ %% Just terminate.
+ ok.
handle_begin(group, Data, St) ->
NewId = proplists:get_value(id, Data),
@@ -323,7 +317,7 @@ write_testcase(
format_testcase_result(ok) -> [<<>>];
format_testcase_result({failed, {error, {Type, _}, _} = Exception}) when is_atom(Type) ->
[?INDENT, ?INDENT, <<"<failure type=\"">>, escape_attr(atom_to_list(Type)), <<"\">">>, ?NEWLINE,
- <<"::">>, escape_text(eunit_lib:format_exception(Exception)),
+ <<"::">>, escape_text(eunit_lib:format_exception(Exception, 100)),
?INDENT, ?INDENT, <<"</failure>">>, ?NEWLINE];
format_testcase_result({failed, Term}) ->
[?INDENT, ?INDENT, <<"<failure type=\"unknown\">">>, ?NEWLINE,
@@ -331,7 +325,7 @@ format_testcase_result({failed, Term}) ->
?INDENT, ?INDENT, <<"</failure>">>, ?NEWLINE];
format_testcase_result({aborted, {Class, _Term, _Trace} = Exception}) when is_atom(Class) ->
[?INDENT, ?INDENT, <<"<error type=\"">>, escape_attr(atom_to_list(Class)), <<"\">">>, ?NEWLINE,
- <<"::">>, escape_text(eunit_lib:format_exception(Exception)),
+ <<"::">>, escape_text(eunit_lib:format_exception(Exception, 100)),
?INDENT, ?INDENT, <<"</error>">>, ?NEWLINE];
format_testcase_result({aborted, Term}) ->
[?INDENT, ?INDENT, <<"<error type=\"unknown\">">>, ?NEWLINE,