diff options
author | Siri Hansen <[email protected]> | 2013-01-10 09:10:34 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-01-10 09:10:34 +0100 |
commit | 4cd517c8168b2bdf7b38544e91afc14b535b3989 (patch) | |
tree | 2183ba45d648c61f7d507b81b6cfed175b1652df /lib/test_server/src/ts.erl | |
parent | 95a477e970cbf88a336408335a482938c12e2e27 (diff) | |
parent | 808ec6e48837ea6f13eda9ab403cc3da220137c8 (diff) | |
download | otp-4cd517c8168b2bdf7b38544e91afc14b535b3989.tar.gz otp-4cd517c8168b2bdf7b38544e91afc14b535b3989.tar.bz2 otp-4cd517c8168b2bdf7b38544e91afc14b535b3989.zip |
Merge branch 'siri/cross-cover/OTP-9870'
* siri/cross-cover/OTP-9870:
[test_server] Don't use print/3 in cross_cover_analyse
[common_test] Add documentation for cross cover analysis
[common_test] Add test case for cross cover mechanism
[test_server] Update documentation about cross cover
[test_server] Add test of code cover mechanism
[test_server,common_test] Fix cross cover mechansim
Diffstat (limited to 'lib/test_server/src/ts.erl')
-rw-r--r-- | lib/test_server/src/ts.erl | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl index 115e783070..cfd7161dbd 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" @@ -528,8 +528,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"])), @@ -558,30 +557,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) -> |