From 783a9ff7515c45fe6ca91d55600c33c6727d4b61 Mon Sep 17 00:00:00 2001 From: Andreas Amsenius Date: Thu, 18 Oct 2012 10:26:26 +0200 Subject: Improve surefire xml element Remove the 'description' attribute. It is not generated by Apache Ant or Maven Surefire and probably ignored by all other Surefire tools. Confirmed for Jenkins. Add testcase description (if there is one) to the 'name' attribute. Change format of 'name' attribute to look more like the output from running eunit with verbose. Line number and arity was quite obscure and arity is not useful as it is always 0. --- lib/eunit/src/eunit_surefire.erl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/eunit') diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl index 2d1f0b1497..c0931588ae 100644 --- a/lib/eunit/src/eunit_surefire.erl +++ b/lib/eunit/src/eunit_surefire.erl @@ -203,9 +203,9 @@ handle_cancel(test, Data, St) -> testcases=[TestCase|TestSuite#testsuite.testcases] }, St#state{testsuites=store_suite(NewTestSuite, TestSuites)}. -format_name({Module, Function, Arity}, Line) -> - lists:flatten([atom_to_list(Module), ":", atom_to_list(Function), "/", - integer_to_list(Arity), "_", integer_to_list(Line)]). +format_name({Module, Function, _Arity}, Line) -> + lists:flatten([atom_to_list(Module), ":", integer_to_list(Line), " ", + atom_to_list(Function)]). format_desc(undefined) -> ""; format_desc(Desc) when is_binary(Desc) -> @@ -334,12 +334,11 @@ write_testcase( FileDescriptor) -> DescriptionAttr = case Description of [] -> []; - _ -> [<<" description=\"">>, escape_attr(Description), <<"\"">>] + _ -> [<<" (">>, escape_attr(Description), <<")">>] end, StartTag = [ ?INDENT, <<">, format_time(Time), - <<"\" name=\"">>, escape_attr(Name), <<"\"">>, - DescriptionAttr], + <<"\" name=\"">>, escape_attr(Name), DescriptionAttr, <<"\"">>], ContentAndEndTag = case {Result, Output} of {ok, <<>>} -> [<<"/>">>, ?NEWLINE]; _ -> [<<">">>, ?NEWLINE, format_testcase_result(Result), format_testcase_output(Output), ?INDENT, <<"">>, ?NEWLINE] -- cgit v1.2.3 From 7a8ef6a2c8c5b6cb07ca5b0b3dcde0e6dffcf730 Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Mon, 21 Apr 2014 00:11:22 +0200 Subject: clean up a comment --- lib/eunit/src/eunit_server.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/eunit') diff --git a/lib/eunit/src/eunit_server.erl b/lib/eunit/src/eunit_server.erl index 2002930abb..387976eba1 100644 --- a/lib/eunit/src/eunit_server.erl +++ b/lib/eunit/src/eunit_server.erl @@ -200,7 +200,7 @@ server_command(From, stop, St) -> server(St#state{stopped = true}); server_command(From, {watch, Target, _Opts}, St) -> %% the code watcher is only started on demand - %% FIXME: this is disabled for now in the OTP distribution + %% TODO: this is disabled for now %%code_monitor:monitor(self()), %% TODO: propagate options to testing stage St1 = add_watch(Target, St), -- cgit v1.2.3 From 000bb96e1871e5866596865f7753f32e930d41ff Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Sun, 21 Dec 2014 22:25:30 +0100 Subject: bumped revision --- lib/eunit/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/eunit') diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk index dca8b3ece0..8b489bdc04 100644 --- a/lib/eunit/vsn.mk +++ b/lib/eunit/vsn.mk @@ -1 +1 @@ -EUNIT_VSN = 2.2.9 +EUNIT_VSN = 2.2.10 -- cgit v1.2.3