aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-11-21 11:44:19 +0100
committerSiri Hansen <[email protected]>2012-12-04 11:35:51 +0100
commitbd67967b55a172b46c29a503439feb1e7c58ab06 (patch)
treedb5f5629f3b44dc62006f9bf690eb818b16dc0ee /lib/test_server/src/ts.erl
parenta545edc30363ea1ddf8b7805c38e748ed4741ffc (diff)
downloadotp-bd67967b55a172b46c29a503439feb1e7c58ab06.tar.gz
otp-bd67967b55a172b46c29a503439feb1e7c58ab06.tar.bz2
otp-bd67967b55a172b46c29a503439feb1e7c58ab06.zip
[test_server,common_test] Fix cross cover mechansim
Update the interface for cross cover analysis (collection of cover data over multiple tests) so it can be used via common_test and directly with test server. The concept of 'application' in the cross cover interface is removed and replaced with an arbitrary Tag=atom() which identifies a test run.
Diffstat (limited to 'lib/test_server/src/ts.erl')
-rw-r--r--lib/test_server/src/ts.erl31
1 files changed, 3 insertions, 28 deletions
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 3ddc58fdbc..bb6fb991e0 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -160,8 +160,8 @@ help(installed) ->
" the given run options\n",
" ts:cross_cover_analyse(Level)\n"
" - Used after ts:run with option cover or \n"
- " cover_details. Analyses modules specified in\n"
- " cross.cover.\n"
+ " cover_details. Analyses modules specified with\n"
+ " a 'cross' statement in the cover spec file.\n"
" Level can be 'overview' or 'details'.\n",
" ts:compile_testcases()~n"
" ts:compile_testcases(Apps)~n"
@@ -506,8 +506,7 @@ cross_cover_analyse([Level]) ->
cross_cover_analyse(Level);
cross_cover_analyse(Level) ->
Apps = get_last_app_tests(),
- Modules = get_cross_modules(Apps,[]),
- test_server_ctrl:cross_cover_analyse(Level,Apps,Modules).
+ test_server_ctrl:cross_cover_analyse(Level,Apps).
get_last_app_tests() ->
AllTests = filelib:wildcard(filename:join(["*","*_test.logs"])),
@@ -536,30 +535,6 @@ get_last_app_tests([Dir|Dirs],RE,Acc) ->
get_last_app_tests([],_,Acc) ->
Acc.
-get_cross_modules([{App,_}|Apps],Acc) ->
- Mods = cross_modules(App),
- get_cross_modules(Apps,lists:umerge(Mods,Acc));
-get_cross_modules([],Acc) ->
- Acc.
-
-cross_modules(App) ->
- case default_coverfile(App) of
- none ->
- [];
- File ->
- case catch file:consult(File) of
- {ok,CoverSpec} ->
- case lists:keyfind(cross_apps,1,CoverSpec) of
- false ->
- [];
- {cross_apps,App,Modules} ->
- lists:usort(Modules)
- end;
- _ ->
- []
- end
- end.
-
%%% Implementation.
check_and_run(Fun) ->