aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/test
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2010-12-14 17:04:13 +0100
committerLukas Larsson <[email protected]>2011-02-17 17:34:51 +0100
commitafd8d827f9d1dd3c2a58a29ce3e102b21b8aa6ed (patch)
tree552c453e867b0ca14b2dde0862f3d06a05db5461 /lib/os_mon/test
parent132f31884e188cfdb78a79fdfaf7e87e8f3ae010 (diff)
downloadotp-afd8d827f9d1dd3c2a58a29ce3e102b21b8aa6ed.tar.gz
otp-afd8d827f9d1dd3c2a58a29ce3e102b21b8aa6ed.tar.bz2
otp-afd8d827f9d1dd3c2a58a29ce3e102b21b8aa6ed.zip
Fix formatting for os_mon
Diffstat (limited to 'lib/os_mon/test')
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl26
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl20
-rw-r--r--lib/os_mon/test/memsup_SUITE.erl24
-rw-r--r--lib/os_mon/test/os_mon_SUITE.erl15
-rw-r--r--lib/os_mon/test/os_mon_mib_SUITE.erl31
-rw-r--r--lib/os_mon/test/os_sup_SUITE.erl20
6 files changed, 72 insertions, 64 deletions
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index 95c17e61a4..73dc901e8a 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -41,10 +41,16 @@ 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),
@@ -53,23 +59,23 @@ end_per_testcase(_Case, Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-case test_server:os_type() of
- {unix, sunos} ->
- [load_api, util_api, util_values, port, unavailable];
- {unix, linux} ->
- [load_api, util_api, util_values, port, unavailable];
- {unix, _OSname} -> [load_api];
- _OS -> [unavailable]
-end.
+ case test_server:os_type() of
+ {unix, sunos} ->
+ [load_api, util_api, util_values, port, unavailable];
+ {unix, linux} ->
+ [load_api, util_api, util_values, port, unavailable];
+ {unix, _OSname} -> [load_api];
+ _OS -> [unavailable]
+ end.
groups() ->
[].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
load_api(suite) ->
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index f33bde21c6..f7fa5bb237 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -53,23 +53,23 @@ end_per_testcase(_Case, Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-Bugs = [otp_5910],
- case test_server:os_type() of
- {unix, sunos} ->
- [api, config, alarm, port, unavailable] ++ Bugs;
- {unix, _OSname} -> [api, alarm] ++ Bugs;
- {win32, _OSname} -> [api, alarm] ++ Bugs;
- _OS -> [unavailable]
-end.
+ Bugs = [otp_5910],
+ case test_server:os_type() of
+ {unix, sunos} ->
+ [api, config, alarm, port, unavailable] ++ Bugs;
+ {unix, _OSname} -> [api, alarm] ++ Bugs;
+ {win32, _OSname} -> [api, alarm] ++ Bugs;
+ _OS -> [unavailable]
+ end.
groups() ->
[].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
api(suite) ->
diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl
index 96748990de..d3aaa64233 100644
--- a/lib/os_mon/test/memsup_SUITE.erl
+++ b/lib/os_mon/test/memsup_SUITE.erl
@@ -52,25 +52,25 @@ end_per_testcase(_Case, Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-All = case test_server:os_type() of
- {unix, sunos} ->
- [api, alarm1, alarm2, process, config, timeout,
- unavailable, port];
- {unix, linux} ->
- [api, alarm1, alarm2, process, timeout];
- _OS -> [api, alarm1, alarm2, process]
- end,
- Bugs = [otp_5910],
- All ++ Bugs.
+ All = case test_server:os_type() of
+ {unix, sunos} ->
+ [api, alarm1, alarm2, process, config, timeout,
+ unavailable, port];
+ {unix, linux} ->
+ [api, alarm1, alarm2, process, timeout];
+ _OS -> [api, alarm1, alarm2, process]
+ end,
+ Bugs = [otp_5910],
+ All ++ Bugs.
groups() ->
[].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
api(suite) ->
diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl
index ac11475789..a2f5317daf 100644
--- a/lib/os_mon/test/os_mon_SUITE.erl
+++ b/lib/os_mon/test/os_mon_SUITE.erl
@@ -20,7 +20,8 @@
-include_lib("test_server/include/test_server.hrl").
%% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2]).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
@@ -41,10 +42,10 @@ end_per_testcase(_Case, Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-case test_server:os_type() of
- {unix, sunos} -> [app_file, config];
- _OS -> [app_file]
-end.
+ case test_server:os_type() of
+ {unix, sunos} -> [app_file, config];
+ _OS -> [app_file]
+ end.
groups() ->
[].
@@ -56,10 +57,10 @@ end_per_suite(_Config) ->
ok.
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
app_file(suite) ->
diff --git a/lib/os_mon/test/os_mon_mib_SUITE.erl b/lib/os_mon/test/os_mon_mib_SUITE.erl
index 8529cf5e0e..5d3ac4b7bd 100644
--- a/lib/os_mon/test/os_mon_mib_SUITE.erl
+++ b/lib/os_mon/test/os_mon_mib_SUITE.erl
@@ -30,7 +30,8 @@
-endif.
% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_suite/1, end_per_suite/1,
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
+ init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2]).
@@ -80,27 +81,27 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-[load_unload, get_mem_sys_mark, get_mem_proc_mark,
- get_disk_threshold, get_load_table,
- {group, get_next_load_table}, get_disk_table,
- {group, get_next_disk_table}, real_snmp_request,
- update_load_table, {group, tickets}].
+ [load_unload, get_mem_sys_mark, get_mem_proc_mark,
+ get_disk_threshold, get_load_table,
+ {group, get_next_load_table}, get_disk_table,
+ {group, get_next_disk_table}, real_snmp_request,
+ update_load_table, {group, tickets}].
groups() ->
[{tickets, [], [otp_6351, otp_7441]},
- {get_next_load_table, [],
- [sys_tot_mem, sys_used_mem, large_erl_process,
- large_erl_process_mem, cpu_load, cpu_load5, cpu_load15,
- os_wordsize, sys_tot_mem64, sys_used_mem64,
- large_erl_process_mem64]},
- {get_next_disk_table, [],
- [disk_descr, disk_kbytes, disk_capacity]}].
+ {get_next_load_table, [],
+ [sys_tot_mem, sys_used_mem, large_erl_process,
+ large_erl_process_mem, cpu_load, cpu_load5, cpu_load15,
+ os_wordsize, sys_tot_mem64, sys_used_mem64,
+ large_erl_process_mem64]},
+ {get_next_disk_table, [],
+ [disk_descr, disk_kbytes, disk_capacity]}].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
diff --git a/lib/os_mon/test/os_sup_SUITE.erl b/lib/os_mon/test/os_sup_SUITE.erl
index 878efedd49..c606001dbd 100644
--- a/lib/os_mon/test/os_sup_SUITE.erl
+++ b/lib/os_mon/test/os_sup_SUITE.erl
@@ -66,23 +66,23 @@ end_per_testcase(_Case, Config) ->
suite() -> [{suite_callbacks,[ts_install_scb]}].
all() ->
-case test_server:os_type() of
- {unix, sunos} -> [message, config, port];
- {win32, _OSname} -> [message];
- OS ->
- Str = io_lib:format("os_sup not available for ~p",
- [OS]),
- {skip, lists:flatten(Str)}
-end.
+ case test_server:os_type() of
+ {unix, sunos} -> [message, config, port];
+ {win32, _OSname} -> [message];
+ OS ->
+ Str = io_lib:format("os_sup not available for ~p",
+ [OS]),
+ {skip, lists:flatten(Str)}
+ end.
groups() ->
[].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
message(suite) ->