aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-03-21 08:13:15 +0100
committerHans Bolinder <[email protected]>2012-03-21 08:13:15 +0100
commit3afb68a0fccdc7372b6a8f237d3efc88697f21e6 (patch)
treef19609727f94c929bbdd1626076c26c9b9a03fd1 /lib/stdlib
parent2729b5e4476300a965f342ae671c9c985b149b20 (diff)
parent87b589c3f7fcdecb572cd301476bb4347ddfac79 (diff)
downloadotp-3afb68a0fccdc7372b6a8f237d3efc88697f21e6.tar.gz
otp-3afb68a0fccdc7372b6a8f237d3efc88697f21e6.tar.bz2
otp-3afb68a0fccdc7372b6a8f237d3efc88697f21e6.zip
Merge branch 'maint'
* maint: Fix continuation error Remove unused file Correct a minor bug in qlc's testsuite
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/test/qlc_SUITE.erl22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl
index 50a76cdfb5..1e74ad7727 100644
--- a/lib/stdlib/test/qlc_SUITE.erl
+++ b/lib/stdlib/test/qlc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -7927,15 +7927,23 @@ run_test(Config, Extra, {cres, Body, Opts, ExpectedCompileReturn}) ->
ok
end,
+ wait_for_expected(R, Before, SourceFile, true),
+ code:purge(Mod);
+run_test(Config, Extra, Body) ->
+ run_test(Config, Extra, {cres,Body,[]}).
+
+wait_for_expected(R, Before, SourceFile, Wait) ->
Ms = erlang:process_info(self(),messages),
After = {get(), pps(), ets:all(), Ms},
- code:purge(Mod),
case {R, After} of
- {ok, Before} -> ok;
- _ -> expected({ok,Before}, {R,After}, SourceFile)
- end;
-run_test(Config, Extra, Body) ->
- run_test(Config, Extra, {cres,Body,[]}).
+ {ok, Before} ->
+ ok;
+ _ when Wait ->
+ timer:sleep(1000),
+ wait_for_expected(R, Before, SourceFile, false);
+ _ ->
+ expected({ok,Before}, {R,After}, SourceFile)
+ end.
unload_pt() ->
erlang:garbage_collect(), % get rid of references to qlc_pt...