diff options
author | Lukas Larsson <[email protected]> | 2011-01-26 20:26:57 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-01-26 20:26:57 +0100 |
commit | a5bb09b0a8a6aac4e47c19b5abdbbb8f54e14133 (patch) | |
tree | e5e5ba40e153b3bb44aef53bcb91a5be80ada68d /lib/test_server | |
parent | 3a4ed77a4b8d29ec6889e60a56e440c7db440628 (diff) | |
download | otp-a5bb09b0a8a6aac4e47c19b5abdbbb8f54e14133.tar.gz otp-a5bb09b0a8a6aac4e47c19b5abdbbb8f54e14133.tar.bz2 otp-a5bb09b0a8a6aac4e47c19b5abdbbb8f54e14133.zip |
Make the call to cover parallel so that the test_server takes advantage of the new cool parallel cover features.
Diffstat (limited to 'lib/test_server')
-rw-r--r-- | lib/test_server/src/test_server.erl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index ee121e5bb6..1045fa9a9b 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -470,7 +470,7 @@ cover_analyse(Analyse,Modules) -> overview -> fun(_) -> undefined end end, - R = lists:map( + R = pmap( fun(M) -> case cover:analyse(M,module) of {ok,{M,{Cov,NotCov}}} -> @@ -486,6 +486,23 @@ cover_analyse(Analyse,Modules) -> stick_all_sticky(node(),Sticky), R. +pmap(Fun,List) -> + Collector = self(), + Pids = lists:map(fun(E) -> + spawn(fun() -> + Collector ! {res,self(),Fun(E)} + end) + end, List), + lists:map(fun(Pid) -> + receive + {res,Pid,Res} -> + Res + end + end, Pids). + + + + unstick_all_sticky(Node) -> lists:filter( |