diff options
author | Siri Hansen <[email protected]> | 2014-05-20 15:30:23 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-05-20 15:30:49 +0200 |
commit | 1118f1cf1baf5803c3a67939f609ee728dea85ee (patch) | |
tree | 6723c9277d02a9cbdc9c445eea3bc2dcf59ec837 /lib/test_server/src/test_server.erl | |
parent | 26be0fbf3434a4c4a4f9d9915e18b7435aa2ad8f (diff) | |
download | otp-1118f1cf1baf5803c3a67939f609ee728dea85ee.tar.gz otp-1118f1cf1baf5803c3a67939f609ee728dea85ee.tar.bz2 otp-1118f1cf1baf5803c3a67939f609ee728dea85ee.zip |
Change internal format of CoverInfo in test_server
This is in preparation of a future change of the cover API between
common_test and test_server.
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-rw-r--r-- | lib/test_server/src/test_server.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index 70dc7a1441..97e1247d85 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -22,7 +22,7 @@ %%% TEST_SERVER_CTRL INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -export([run_test_case_apply/1,init_target_info/0,init_purify/0]). --export([cover_compile/1,cover_analyse/3]). +-export([cover_compile/1,cover_analyse/4]). %%% TEST_SERVER_SUP INTERFACE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -export([get_loc/1,set_tc_state/1]). @@ -211,9 +211,10 @@ do_cover_compile1([]) -> ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% cover_analyse(Analyse,Modules,Stop) -> [{M,{Cov,NotCov,Details}}] +%% cover_analyse(Dir,Analyse,Modules,Stop) -> [{M,{Cov,NotCov,Details}}] %% -%% Analyse = {details,Dir} | details | {overview,void()} | overview +%% Dir = string() +%% Analyse = details | overview %% Modules = [atom()], the modules to analyse %% %% Cover analysis. If Analyse=={details,Dir} analyse_to_file is used. @@ -235,11 +236,11 @@ do_cover_compile1([]) -> %% which means that the modules will stay cover compiled. Note that %% this is only recommended if the erlang node is being terminated %% after the test is completed. -cover_analyse(Analyse,Modules,Stop) -> +cover_analyse(Dir,Analyse,Modules,Stop) -> print(stdout, "Cover analysing...\n", []), DetailsFun = case Analyse of - {details,Dir} -> + details -> case cover:export(filename:join(Dir,"all.coverdata")) of ok -> fun(M) -> @@ -256,7 +257,7 @@ cover_analyse(Analyse,Modules,Stop) -> Error -> fun(_) -> Error end end; - {overview,Dir} -> + overview -> case cover:export(filename:join(Dir,"all.coverdata")) of ok -> fun(_) -> undefined end; |