diff options
author | Henrik Nord <[email protected]> | 2015-06-05 14:55:54 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-06-05 14:55:54 +0200 |
commit | 66097231a9ab3f909b2608eb16f7a08bed0315b3 (patch) | |
tree | 826ed868541b0feaa14bc9e845d04ce1396f90b9 /lib | |
parent | cbda735e138a764e78cf668bcf9eec292bc5cc11 (diff) | |
parent | 000bb96e1871e5866596865f7753f32e930d41ff (diff) | |
download | otp-66097231a9ab3f909b2608eb16f7a08bed0315b3.tar.gz otp-66097231a9ab3f909b2608eb16f7a08bed0315b3.tar.bz2 otp-66097231a9ab3f909b2608eb16f7a08bed0315b3.zip |
Merge branch 'richcarl/eunit-2.2.10'
* richcarl/eunit-2.2.10:
bumped revision
clean up a comment
Improve surefire xml <testcase> element
Conflicts:
lib/eunit/src/eunit_surefire.erl
lib/eunit/vsn.mk
Diffstat (limited to 'lib')
-rw-r--r-- | lib/eunit/src/eunit_server.erl | 2 | ||||
-rw-r--r-- | lib/eunit/src/eunit_surefire.erl | 12 |
2 files changed, 6 insertions, 8 deletions
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), diff --git a/lib/eunit/src/eunit_surefire.erl b/lib/eunit/src/eunit_surefire.erl index d6684f33cb..f3e58a3d1c 100644 --- a/lib/eunit/src/eunit_surefire.erl +++ b/lib/eunit/src/eunit_surefire.erl @@ -203,10 +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) -> @@ -335,12 +334,11 @@ write_testcase( FileDescriptor) -> DescriptionAttr = case Description of [] -> []; - _ -> [<<" description=\"">>, escape_attr(Description), <<"\"">>] + _ -> [<<" (">>, escape_attr(Description), <<")">>] end, StartTag = [ ?INDENT, <<"<testcase time=\"">>, 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, <<"</testcase>">>, ?NEWLINE] |