~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/eunit/src/eunit.erl

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
14
14
%% USA
15
15
%%
16
 
%% $Id: eunit.erl 339 2009-04-05 14:10:47Z rcarlsson $
17
 
%%
18
16
%% @copyright 2004-2009 Micka�l R�mond, Richard Carlsson
19
 
%% @author Micka&euml;l R&eacute;mond <mickael.remond@process-one.net>
 
17
%% @author Micka�l R�mond <mickael.remond@process-one.net>
20
18
%%   [http://www.process-one.net/]
21
 
%% @author Richard Carlsson <richardc@it.uu.se>
22
 
%%   [http://user.it.uu.se/~richardc/]
 
19
%% @author Richard Carlsson <carlsson.richard@gmail.com>
23
20
%% @version {@version}, {@date} {@time}
24
21
%% @doc This module is the main EUnit user interface.
25
22
 
157
154
    receive
158
155
        {done, Reference} ->
159
156
            cast(Listeners, {stop, Reference, self()}),
 
157
            wait_until_listeners_have_terminated(Listeners),
160
158
            receive
161
159
                {result, Reference, Result} ->
162
160
                    Result
169
167
cast([], _Msg) ->
170
168
    ok.
171
169
 
 
170
wait_until_listeners_have_terminated([P | Ps]) ->
 
171
    MRef = erlang:monitor(process, P),
 
172
    receive
 
173
        {'DOWN', MRef, process, P, _} ->
 
174
            wait_until_listeners_have_terminated(Ps)
 
175
    end;
 
176
wait_until_listeners_have_terminated([]) ->
 
177
    ok.
 
178
 
172
179
%% TODO: functions that run tests on a given node, not a given server
173
180
%% TODO: maybe some functions could check for a globally registered server?
174
181
%% TODO: some synchronous but completely quiet interface function