aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-10 09:59:18 +0100
committerBjörn Gustavsson <[email protected]>2016-03-10 09:59:18 +0100
commitc7be5e1cde88becf729d7f3fbd84e7e3a623efb0 (patch)
tree200d7b0e1bd88411fb4979e7cce35aef4366cc94 /lib/kernel
parente42208ce5d5e76056f9c199d52512275c98b50c1 (diff)
parentdaced2188902968b16cc7ada1782e395e1e2e938 (diff)
downloadotp-c7be5e1cde88becf729d7f3fbd84e7e3a623efb0.tar.gz
otp-c7be5e1cde88becf729d7f3fbd84e7e3a623efb0.tar.bz2
otp-c7be5e1cde88becf729d7f3fbd84e7e3a623efb0.zip
Merge branch 'bjorn/multiple-load/OTP-13111'
* bjorn/multiple-load/OTP-13111: erl_prim_loader_SUITE: Add debug printout Skip erl_prim_loader_SUITE:get_modules/1 when cover-compiled multi_load_SUITE: Clarify failure reasons multi_load_SUITE: Don't fail on non-HiPE systems
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl9
-rw-r--r--lib/kernel/test/multi_load_SUITE.erl11
2 files changed, 17 insertions, 3 deletions
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index bccca59b93..55a5b1acf8 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.erl
@@ -112,6 +112,12 @@ get_file(Config) when is_list(Config) ->
ok.
get_modules(_Config) ->
+ case test_server:is_cover() of
+ false -> do_get_modules();
+ true -> {skip,"Cover"}
+ end.
+
+do_get_modules() ->
MsGood = lists:sort([lists,gen_server,gb_trees,code_server]),
Ms = [certainly_not_existing|MsGood],
SuccExp = [begin
@@ -121,6 +127,9 @@ get_modules(_Config) ->
end || M <- MsGood],
FailExp = [{certainly_not_existing,enoent}],
+ io:format("SuccExp = ~p\n", [SuccExp]),
+ io:format("FailExp = ~p\n", [FailExp]),
+
Path = code:get_path(),
Process = fun(_, F, Code) -> {ok,{F,erlang:md5(Code)}} end,
{ok,{Succ,FailExp}} = erl_prim_loader:get_modules(Ms, Process, Path),
diff --git a/lib/kernel/test/multi_load_SUITE.erl b/lib/kernel/test/multi_load_SUITE.erl
index bb87443e36..fa8877e117 100644
--- a/lib/kernel/test/multi_load_SUITE.erl
+++ b/lib/kernel/test/multi_load_SUITE.erl
@@ -272,7 +272,12 @@ do_ensure_modules_loaded(Dir) ->
true = is_loaded(Mod),
true = is_loaded(OLMod),
true = is_loaded(NativeMod),
- true = NativeMod:module_info(native),
+
+ ModuleNative = case erlang:system_info(hipe_architecture) of
+ undefined -> false;
+ _ -> true
+ end,
+ ModuleNative = NativeMod:module_info(native),
ok.
@@ -357,9 +362,9 @@ atomic_load_error(Modules, ErrorInFinishLoading) ->
{B,B} ->
Errors;
{false,true} ->
- ct:fail("LastAction fun must not be called");
+ ct:fail("code:prepare_loading/1 should have failed");
{true,false} ->
- ct:fail("LastAction fun was not called")
+ ct:fail("code:prepare_loading/1 should have succeeded")
end.
is_loaded(Mod) ->