aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-09-18 13:51:34 +0200
committerSiri Hansen <[email protected]>2018-09-18 13:51:34 +0200
commit59b49c6a5bc8053db97a27029ecf5245784b45fc (patch)
treea903a63bae7dd60c5e8ec39c7c880e795c7e4d00
parent41e4dcf4993756390e340e25e2724c11bdab337e (diff)
parentb1216cf39c987a65f5545f8d9034a1c37f1654cf (diff)
downloadotp-59b49c6a5bc8053db97a27029ecf5245784b45fc.tar.gz
otp-59b49c6a5bc8053db97a27029ecf5245784b45fc.tar.bz2
otp-59b49c6a5bc8053db97a27029ecf5245784b45fc.zip
Merge branch 'siri/cuddle' into maint
* siri/cuddle: [logger] Skip app level test if app cannot be loaded Terminate nodes after failed test cases in erl_distribution_SUITE Skip performance test on build types other than 'opt'
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl1
-rw-r--r--lib/kernel/test/logger_SUITE.erl33
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl7
3 files changed, 27 insertions, 14 deletions
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index 0e13f0383e..5a8bbd56c4 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -89,6 +89,7 @@ init_per_suite(Config) ->
Config.
end_per_suite(_Config) ->
+ [slave:stop(N) || N <- nodes()],
ok.
init_per_group(_GroupName, Config) ->
diff --git a/lib/kernel/test/logger_SUITE.erl b/lib/kernel/test/logger_SUITE.erl
index 36c093d7f4..b7ccba8e70 100644
--- a/lib/kernel/test/logger_SUITE.erl
+++ b/lib/kernel/test/logger_SUITE.erl
@@ -436,27 +436,32 @@ set_application_level(_Config) ->
{error,{not_loaded,mnesia}} = logger:set_application_level(mnesia, warning),
{error,{not_loaded,mnesia}} = logger:unset_application_level(mnesia),
- application:load(mnesia),
- {ok, Modules} = application:get_key(mnesia, modules),
- [] = logger:get_module_level(Modules),
+ case application:load(mnesia) of
+ ok ->
+ {ok, Modules} = application:get_key(mnesia, modules),
+ [] = logger:get_module_level(Modules),
- {error,{invalid_level,warn}} = logger:set_application_level(mnesia, warn),
+ {error,{invalid_level,warn}} =
+ logger:set_application_level(mnesia, warn),
- ok = logger:set_application_level(mnesia, debug),
- DebugModules = lists:sort([{M,debug} || M <- Modules]),
- DebugModules = lists:sort(logger:get_module_level(Modules)),
+ ok = logger:set_application_level(mnesia, debug),
+ DebugModules = lists:sort([{M,debug} || M <- Modules]),
+ DebugModules = lists:sort(logger:get_module_level(Modules)),
- ok = logger:set_application_level(mnesia, warning),
+ ok = logger:set_application_level(mnesia, warning),
- WarnModules = lists:sort([{M,warning} || M <- Modules]),
- WarnModules = lists:sort(logger:get_module_level(Modules)),
+ WarnModules = lists:sort([{M,warning} || M <- Modules]),
+ WarnModules = lists:sort(logger:get_module_level(Modules)),
- ok = logger:unset_application_level(mnesia),
- [] = logger:get_module_level(Modules).
+ ok = logger:unset_application_level(mnesia),
+ [] = logger:get_module_level(Modules);
+ {error,{"no such file or directory","mnesia.app"}} ->
+ {skip, "Cannot load mnesia, does not exist"}
+ end.
set_application_level(cleanup,_Config) ->
- ok = logger:unset_application_level(mnesia),
- ok = application:unload(mnesia),
+ _ = logger:unset_application_level(mnesia),
+ _ = application:unload(mnesia),
ok.
cache_module_level(_Config) ->
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index ed7dd04171..9370067910 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -2339,6 +2339,13 @@ order_of_children(_Config) ->
%% Test that a non-simple supervisor scales well for starting and
%% stopping many children.
scale_start_stop_many_children(_Config) ->
+ case erlang:system_info(build_type) of
+ opt -> scale_start_stop_many_children();
+ Other -> {skip,"Run on build type 'opt' only (current: '" ++
+ atom_to_list(Other)++"')"}
+ end.
+
+scale_start_stop_many_children() ->
process_flag(trap_exit, true),
{ok, _Pid} = start_link({ok, {{one_for_one, 2, 3600}, []}}),
N1 = 1000,