aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/test/cpu_sup_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/os_mon/test/cpu_sup_SUITE.erl')
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl38
1 files changed, 26 insertions, 12 deletions
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index 45f9d981d1..174317527c 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -17,10 +17,10 @@
%% %CopyrightEnd%
%%
-module(cpu_sup_SUITE).
--include("test_server.hrl").
+-include_lib("test_server/include/test_server.hrl").
%% Test server specific exports
--export([all/1]).
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]).
-export([init_per_suite/1, end_per_suite/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -41,29 +41,43 @@ end_per_suite(Config) when is_list(Config) ->
?line ok = application:stop(os_mon),
Config.
+init_per_testcase(unavailable, Config) ->
+ terminate(Config),
+ init_per_testcase(dummy, Config);
init_per_testcase(_Case, Config) ->
Dog = ?t:timetrap(?default_timeout),
[{watchdog, Dog} | Config].
+end_per_testcase(unavailable, Config) ->
+ restart(Config),
+ end_per_testcase(dummy, Config);
end_per_testcase(_Case, Config) ->
Dog = ?config(watchdog, Config),
?t:timetrap_cancel(Dog),
ok.
-all(suite) ->
- case ?t:os_type() of
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ case test_server:os_type() of
{unix, sunos} ->
- [load_api, util_api, util_values, port,
- {conf, terminate, [unavailable], restart}];
+ [load_api, util_api, util_values, port, unavailable];
{unix, linux} ->
- [load_api, util_api, util_values, port,
- {conf, terminate, [unavailable], restart}];
- {unix, _OSname} ->
- [load_api];
- _OS ->
- [unavailable]
+ [load_api, util_api, util_values, port, unavailable];
+ {unix, _OSname} -> [load_api];
+ _OS -> [unavailable]
end.
+groups() ->
+ [].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
load_api(suite) ->
[];
load_api(doc) ->