diff options
Diffstat (limited to 'lib/tools')
-rw-r--r-- | lib/tools/doc/src/notes.xml | 2 | ||||
-rw-r--r-- | lib/tools/src/cover.erl | 1 | ||||
-rw-r--r-- | lib/tools/test/cover_SUITE.erl | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml index 118800e44a..93bb6b71c9 100644 --- a/lib/tools/doc/src/notes.xml +++ b/lib/tools/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2010</year> + <year>2004</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 73a736f0e8..905ad895c9 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -662,6 +662,7 @@ main_process_loop(State) -> Imported = do_import_to_table(Fd,File, State#main_state.imported), reply(From, ok), + file:close(Fd), main_process_loop(State#main_state{imported=Imported}); {error,Reason} -> reply(From, {error, {cant_open_file,File,Reason}}), diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl index b5c8e8a1b7..fe7f92de78 100644 --- a/lib/tools/test/cover_SUITE.erl +++ b/lib/tools/test/cover_SUITE.erl @@ -395,6 +395,7 @@ export_import(suite) -> []; export_import(Config) when is_list(Config) -> ?line DataDir = ?config(data_dir, Config), ?line ok = file:set_cwd(DataDir), + ?line PortCount = length(erlang:ports()), %% Export one module ?line {ok,f} = cover:compile(f), @@ -484,6 +485,9 @@ export_import(Config) when is_list(Config) -> ?line ?t:capture_stop(), ?line check_f_calls(1,0), + %% Check no raw files are left open + ?line PortCount = length(erlang:ports()), + %% Cleanup ?line ok = cover:stop(), ?line Files = lsfiles(), |