diff options
Diffstat (limited to 'lib/tools')
-rw-r--r-- | lib/tools/doc/src/eprof.xml | 2 | ||||
-rw-r--r-- | lib/tools/doc/src/notes.xml | 35 | ||||
-rw-r--r-- | lib/tools/emacs/erlang.el | 2 | ||||
-rw-r--r-- | lib/tools/src/cover.erl | 2 | ||||
-rw-r--r-- | lib/tools/src/make.erl | 10 | ||||
-rw-r--r-- | lib/tools/test/cover_SUITE.erl | 24 | ||||
-rw-r--r-- | lib/tools/test/cover_SUITE_data/include_eunit_hrl/cover_inc_eunit.erl | 6 | ||||
-rw-r--r-- | lib/tools/vsn.mk | 2 |
8 files changed, 76 insertions, 7 deletions
diff --git a/lib/tools/doc/src/eprof.xml b/lib/tools/doc/src/eprof.xml index 7dccd927ca..8e37d49c99 100644 --- a/lib/tools/doc/src/eprof.xml +++ b/lib/tools/doc/src/eprof.xml @@ -131,13 +131,13 @@ <name>analyze() -> ok</name> <name>analyze(Type) -> ok</name> <name>analyze(Type,Options) -> ok</name> + <fsummary>Display profiling results per process.</fsummary> <type> <v>Type = procs | total</v> <v>Options = [{filter, Filter} | {sort, Sort}</v> <v>Filter = [{calls, integer()} | {time, float()}]</v> <v>Sort = time | calls | mfa</v> </type> - <fsummary>Display profiling results per process.</fsummary> <desc> <p>Call this function when profiling has been stopped to display the results per process, that is:</p> diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml index e788814564..985207a39b 100644 --- a/lib/tools/doc/src/notes.xml +++ b/lib/tools/doc/src/notes.xml @@ -31,6 +31,41 @@ </header> <p>This document describes the changes made to the Tools application.</p> +<section><title>Tools 2.8.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The emacs mode does not add a newline after the arrow on + -callback lines anymore.</p> + <p> + Own Id: OTP-13042</p> + </item> + </list> + </section> + +</section> + +<section><title>Tools 2.8.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + If a module includes eunit.hrl, a parse transform adds + the function test/0 on line 0 in the module. A bug in + OTP-18.0 caused cover:analyse_to_file/1 to fail to insert + cover data in the output file when line 0 existed in the + cover data table. This is now corrected.</p> + <p> + Own Id: OTP-12981</p> + </item> + </list> + </section> + +</section> + <section><title>Tools 2.8</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 4aa1ab7d38..466bf139b9 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -4236,7 +4236,7 @@ This function is designed to be a member of a criteria list." This function is designed to be a member of a criteria list." (save-excursion (beginning-of-line) - (when (save-match-data (looking-at "-\\(spec\\|type\\)")) + (when (save-match-data (looking-at "-\\(spec\\|type\\|callback\\)")) 'stop))) diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 8d1cb96504..366d6bcbd9 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -2437,7 +2437,7 @@ do_analyse_to_file1(Module, OutFile, ErlFile, HTML) -> "\n\n"]), Pattern = {#bump{module=Module,line='$1',_='_'},'$2'}, - MS = [{Pattern,[],[{{'$1','$2'}}]}], + MS = [{Pattern,[{is_integer,'$1'},{'>','$1',0}],[{{'$1','$2'}}]}], CovLines = lists:keysort(1,ets:select(?COLLECTION_TABLE, MS)), print_lines(Module, CovLines, InFd, OutFd, 1, HTML), diff --git a/lib/tools/src/make.erl b/lib/tools/src/make.erl index 96c3e0e506..5d5a1ef2bd 100644 --- a/lib/tools/src/make.erl +++ b/lib/tools/src/make.erl @@ -25,12 +25,20 @@ %% If Emakefile is missing the current directory is used. -module(make). --export([all/0,all/1,files/1,files/2]). +-export([all_or_nothing/0,all/0,all/1,files/1,files/2]). -include_lib("kernel/include/file.hrl"). -define(MakeOpts,[noexec,load,netload,noload]). +all_or_nothing() -> + case all() of + up_to_date -> + up_to_date; + error -> + halt(1) + end. + all() -> all([]). diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl index 931e3e2cfa..25c9317608 100644 --- a/lib/tools/test/cover_SUITE.erl +++ b/lib/tools/test/cover_SUITE.erl @@ -31,7 +31,7 @@ otp_5031/1, eif/1, otp_5305/1, otp_5418/1, otp_6115/1, otp_7095/1, otp_8188/1, otp_8270/1, otp_8273/1, otp_8340/1, otp_10979_hanging_node/1, compile_beam_opts/1, eep37/1, - analyse_no_beam/1]). + analyse_no_beam/1, line_0/1]). -export([do_coverage/1]). @@ -55,7 +55,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> NoStartStop = [eif,otp_5305,otp_5418,otp_7095,otp_8273, otp_8340,otp_8188,compile_beam_opts,eep37, - analyse_no_beam], + analyse_no_beam, line_0], StartStop = [start, compile, analyse, misc, stop, distribution, reconnect, die_and_reconnect, dont_reconnect_after_stop, stop_node_after_disconnect, @@ -1727,6 +1727,26 @@ analyse_no_beam(Config) when is_list(Config) -> ok = file:set_cwd(Cwd), ok. +%% When including eunit.hrl, a parse transform adds the function +%% test/0 to line 0 in your module. A bug in OTP-18.0 caused +%% cover:analyse_to_file/1 to fail to insert cover data in the output +%% file in this situation. The test below tests that this bug is +%% corrected. +line_0(Config) -> + ok = file:set_cwd(filename:join(?config(data_dir, Config), + "include_eunit_hrl")), + {ok, cover_inc_eunit} = compile:file(cover_inc_eunit,[debug_info]), + {ok, cover_inc_eunit} = cover:compile_beam(cover_inc_eunit), + {ok, CovOut} = cover:analyse_to_file(cover_inc_eunit), + + {ok,Bin} = file:read_file(CovOut), + Match = <<"0..| ok.\n">>, % "0.." is missing when bug is there + S = byte_size(Bin)-byte_size(Match), + <<_:S/binary,Match/binary>> = Bin, + ok. + + + %%--Auxiliary------------------------------------------------------------ analyse_expr(Expr, Config) -> diff --git a/lib/tools/test/cover_SUITE_data/include_eunit_hrl/cover_inc_eunit.erl b/lib/tools/test/cover_SUITE_data/include_eunit_hrl/cover_inc_eunit.erl new file mode 100644 index 0000000000..c1fe7939d2 --- /dev/null +++ b/lib/tools/test/cover_SUITE_data/include_eunit_hrl/cover_inc_eunit.erl @@ -0,0 +1,6 @@ +-module(cover_inc_eunit). +-compile(export_all). +-include_lib("eunit/include/eunit.hrl"). + +func() -> + ok. diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk index 68c3f6e29c..3efe89d9f9 100644 --- a/lib/tools/vsn.mk +++ b/lib/tools/vsn.mk @@ -1 +1 @@ -TOOLS_VSN = 2.8 +TOOLS_VSN = 2.8.2 |