From 2cbb5d191fd8f94c113cbf61c243999388f65c3b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Oct 2010 17:58:16 +0200 Subject: Update all fin_per_testcase to end_per_testcase. --- lib/os_mon/test/os_mon_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index ce52271ff8..033c61e3c8 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -21,7 +21,7 @@ %% Test server specific exports -export([all/1]). --export([init_per_testcase/2, fin_per_testcase/2]). +-export([init_per_testcase/2, end_per_testcase/2]). %% Test cases -export([app_file/1, config/1]). @@ -33,7 +33,7 @@ init_per_testcase(_Case, Config) -> Dog = test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -- cgit v1.2.3 From 60c006def535e129f73d3834dba9f8b2bfa74813 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:52:14 +0200 Subject: Update os_mon tests to conform with common_test standard --- lib/os_mon/test/cpu_sup_SUITE.erl | 36 ++++++++++++--------- lib/os_mon/test/disksup_SUITE.erl | 36 ++++++++++++--------- lib/os_mon/test/memsup_SUITE.erl | 37 +++++++++++++--------- lib/os_mon/test/os_mon.spec | 2 +- lib/os_mon/test/os_mon_SUITE.erl | 24 +++++++++----- lib/os_mon/test/os_mon_mib_SUITE.erl | 61 ++++++++++++++++-------------------- lib/os_mon/test/os_sup_SUITE.erl | 33 ++++++++++++------- 7 files changed, 131 insertions(+), 98 deletions(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl index 45f9d981d1..7c51b9b54b 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,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]). @@ -50,19 +50,25 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> - case ?t:os_type() of - {unix, sunos} -> - [load_api, util_api, util_values, port, - {conf, terminate, [unavailable], restart}]; - {unix, linux} -> - [load_api, util_api, util_values, port, - {conf, terminate, [unavailable], restart}]; - {unix, _OSname} -> - [load_api]; - _OS -> - [unavailable] - end. +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. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + load_api(suite) -> []; diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index 987d631c36..f21b8db2ae 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -17,10 +17,10 @@ %% %CopyrightEnd% %% -module(disksup_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/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]). @@ -50,19 +50,25 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> - Bugs = [otp_5910], - case ?t:os_type() of - {unix, sunos} -> - [api, config, alarm, port, - {conf, terminate, [unavailable], restart}] ++ Bugs; - {unix, _OSname} -> - [api, alarm] ++ Bugs; - {win32, _OSname} -> - [api, alarm] ++ Bugs; - _OS -> - [unavailable] - end. +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. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + api(suite) -> []; diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl index 01a7f6c7f2..dc7af32746 100644 --- a/lib/os_mon/test/memsup_SUITE.erl +++ b/lib/os_mon/test/memsup_SUITE.erl @@ -17,10 +17,10 @@ %% %CopyrightEnd% %% -module(memsup_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/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]). @@ -49,18 +49,27 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), Config. -all(suite) -> - All = case ?t: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() -> +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. + +end_per_group(_GroupName, Config) -> + Config. + api(suite) -> []; diff --git a/lib/os_mon/test/os_mon.spec b/lib/os_mon/test/os_mon.spec index bdae523795..859859c587 100644 --- a/lib/os_mon/test/os_mon.spec +++ b/lib/os_mon/test/os_mon.spec @@ -1 +1 @@ -{topcase, {dir, "../os_mon_test"}}. +{suites,"os_mon_test",all}. diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index 033c61e3c8..f5dea6a92d 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -17,10 +17,10 @@ %% %CopyrightEnd% %% -module(os_mon_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2]). %% Test cases @@ -38,11 +38,21 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -all(suite) -> - case ?t:os_type() of - {unix, sunos} -> [app_file, config]; - _OS -> [app_file] - end. +all() -> +case test_server:os_type() of + {unix, sunos} -> [app_file, config]; + _OS -> [app_file] +end. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, 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 a1d463030a..d784b636ff 100644 --- a/lib/os_mon/test/os_mon_mib_SUITE.erl +++ b/lib/os_mon/test/os_mon_mib_SUITE.erl @@ -24,13 +24,13 @@ -define(line,erlang:display({line,?LINE}),). -define(config(A,B), config(A,B)). -else. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("os_mon/include/OTP-OS-MON-MIB.hrl"). -include_lib("snmp/include/snmp_types.hrl"). -endif. % Test server specific exports --export([all/1, init_per_suite/1, end_per_suite/1, +-export([all/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]). @@ -38,8 +38,8 @@ -export([update_load_table/1]). -export([get_mem_sys_mark/1, get_mem_proc_mark/1, get_disk_threshold/1, - get_load_table/1, get_next_load_table/1, get_disk_table/1, - get_next_disk_table/1, real_snmp_request/1, load_unload/1]). + get_load_table/1, get_disk_table/1, + real_snmp_request/1, load_unload/1]). -export([sys_tot_mem/1, sys_used_mem/1, large_erl_process/1, large_erl_process_mem/1, cpu_load/1, cpu_load5/1, cpu_load15/1, @@ -47,7 +47,7 @@ large_erl_process_mem64/1, disk_descr/1, disk_kbytes/1, disk_capacity/1]). --export([tickets/1]). +-export([]). -export([otp_6351/1, otp_7441/1]). -define(TRAP_UDP, 5000). @@ -77,17 +77,30 @@ end_per_testcase(_Case, Config) when is_list(Config) -> test_server:timetrap_cancel(Dog), Config. -all(doc) -> - ["Test os_mon mibs and provided instrumentation functions."]; +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}]. + +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]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [load_unload, get_mem_sys_mark, get_mem_proc_mark, - get_disk_threshold, get_load_table, get_next_load_table, - get_disk_table, get_next_disk_table, real_snmp_request, - update_load_table, tickets]. -tickets(suite) -> - [otp_6351, otp_7441]. -endif. %%--------------------------------------------------------------------- @@ -338,21 +351,6 @@ get_load_table(Config) when is_list(Config) -> ok. %%--------------------------------------------------------------------- -get_next_load_table(doc) -> - ["Simulates get_next calls to test the instrumentation function " - "for the loadTable"]; -get_next_load_table(suite) -> - [ 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]. sys_tot_mem(doc) -> []; @@ -592,11 +590,6 @@ get_disk_table(Config) when is_list(Config) -> ok. %%--------------------------------------------------------------------- -get_next_disk_table(doc) -> - ["Simulates get_next calls to test the instrumentation function " - "for the diskTable."]; -get_next_disk_table(suite) -> - [disk_descr, disk_kbytes, disk_capacity]. disk_descr(doc) -> []; diff --git a/lib/os_mon/test/os_sup_SUITE.erl b/lib/os_mon/test/os_sup_SUITE.erl index 25041f968d..02e1acf1b7 100644 --- a/lib/os_mon/test/os_sup_SUITE.erl +++ b/lib/os_mon/test/os_sup_SUITE.erl @@ -17,10 +17,10 @@ %% %CopyrightEnd% %% -module(os_sup_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/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]). @@ -63,16 +63,25 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> - case ?t: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. +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. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + message(suite) -> []; -- cgit v1.2.3 From 83f932257470f5ae01fc61130e997fdea0562653 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 6 Dec 2010 16:48:31 +0100 Subject: Add ts_install_scb to suite/0 --- lib/os_mon/test/cpu_sup_SUITE.erl | 4 +++- lib/os_mon/test/disksup_SUITE.erl | 4 +++- lib/os_mon/test/memsup_SUITE.erl | 4 +++- lib/os_mon/test/os_mon_SUITE.erl | 4 +++- lib/os_mon/test/os_mon_mib_SUITE.erl | 4 +++- lib/os_mon/test/os_sup_SUITE.erl | 4 +++- 6 files changed, 18 insertions(+), 6 deletions(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl index 7c51b9b54b..95c17e61a4 100644 --- a/lib/os_mon/test/cpu_sup_SUITE.erl +++ b/lib/os_mon/test/cpu_sup_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0,groups/0,init_per_group/2,end_per_group/2]). +-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]). @@ -50,6 +50,8 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> case test_server:os_type() of {unix, sunos} -> diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index f21b8db2ae..f33bde21c6 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0,groups/0,init_per_group/2,end_per_group/2]). +-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]). @@ -50,6 +50,8 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> Bugs = [otp_5910], case test_server:os_type() of diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl index dc7af32746..96748990de 100644 --- a/lib/os_mon/test/memsup_SUITE.erl +++ b/lib/os_mon/test/memsup_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0,groups/0,init_per_group/2,end_per_group/2]). +-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]). @@ -49,6 +49,8 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), Config. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> All = case test_server:os_type() of {unix, sunos} -> diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index f5dea6a92d..2706873b79 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0,groups/0,init_per_group/2,end_per_group/2]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2]). %% Test cases @@ -38,6 +38,8 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> case test_server:os_type() of {unix, sunos} -> [app_file, config]; diff --git a/lib/os_mon/test/os_mon_mib_SUITE.erl b/lib/os_mon/test/os_mon_mib_SUITE.erl index d784b636ff..8529cf5e0e 100644 --- a/lib/os_mon/test/os_mon_mib_SUITE.erl +++ b/lib/os_mon/test/os_mon_mib_SUITE.erl @@ -30,7 +30,7 @@ -endif. % Test server specific exports --export([all/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]). @@ -77,6 +77,8 @@ end_per_testcase(_Case, Config) when is_list(Config) -> test_server:timetrap_cancel(Dog), Config. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [load_unload, get_mem_sys_mark, get_mem_proc_mark, get_disk_threshold, get_load_table, diff --git a/lib/os_mon/test/os_sup_SUITE.erl b/lib/os_mon/test/os_sup_SUITE.erl index 02e1acf1b7..878efedd49 100644 --- a/lib/os_mon/test/os_sup_SUITE.erl +++ b/lib/os_mon/test/os_sup_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0,groups/0,init_per_group/2,end_per_group/2]). +-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]). @@ -63,6 +63,8 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> case test_server:os_type() of {unix, sunos} -> [message, config, port]; -- cgit v1.2.3 From 8fd1f31f3074bc9444a0769418506b1ccc2041d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 11:35:13 +0100 Subject: Add init_per_suite and end_per_suite --- lib/os_mon/test/os_mon_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index 2706873b79..ac11475789 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/0, suite/0,groups/0,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 @@ -49,6 +49,12 @@ end. groups() -> []. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From afd8d827f9d1dd3c2a58a29ce3e102b21b8aa6ed Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 17:04:13 +0100 Subject: Fix formatting for os_mon --- lib/os_mon/test/cpu_sup_SUITE.erl | 26 ++++++++++++++++---------- lib/os_mon/test/disksup_SUITE.erl | 20 ++++++++++---------- lib/os_mon/test/memsup_SUITE.erl | 24 ++++++++++++------------ lib/os_mon/test/os_mon_SUITE.erl | 15 ++++++++------- lib/os_mon/test/os_mon_mib_SUITE.erl | 31 ++++++++++++++++--------------- lib/os_mon/test/os_sup_SUITE.erl | 20 ++++++++++---------- 6 files changed, 72 insertions(+), 64 deletions(-) (limited to 'lib/os_mon') 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) -> -- cgit v1.2.3 From 5fef403779c4894189abf6fd18e6c8e5d54064c5 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 17:52:12 +0100 Subject: Update all test specs --- lib/os_mon/test/os_mon.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/os_mon.spec b/lib/os_mon/test/os_mon.spec index 859859c587..d292b258f3 100644 --- a/lib/os_mon/test/os_mon.spec +++ b/lib/os_mon/test/os_mon.spec @@ -1 +1 @@ -{suites,"os_mon_test",all}. +{suites,"../os_mon_test",all}. -- cgit v1.2.3 From cfa01c9bd748df38750dc4841030e6520610538a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Jan 2011 14:56:23 +0100 Subject: Update and add cover spec files to work with common_test --- lib/os_mon/test/Makefile | 2 +- lib/os_mon/test/os_mon.cover | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lib/os_mon/test/os_mon.cover (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/Makefile b/lib/os_mon/test/Makefile index c87285e38b..f14a791806 100644 --- a/lib/os_mon/test/Makefile +++ b/lib/os_mon/test/Makefile @@ -85,7 +85,7 @@ release_spec: release_tests_spec: make_emakefile $(INSTALL_DIR) $(RELSYSDIR) - $(INSTALL_DATA) os_mon.spec $(EMAKEFILE) $(SOURCE) $(RELSYSDIR) + $(INSTALL_DATA) os_mon.spec os_mon.cover $(EMAKEFILE) $(SOURCE) $(RELSYSDIR) ## tar chf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) diff --git a/lib/os_mon/test/os_mon.cover b/lib/os_mon/test/os_mon.cover new file mode 100644 index 0000000000..aa07391351 --- /dev/null +++ b/lib/os_mon/test/os_mon.cover @@ -0,0 +1,2 @@ +{incl_app,os_mon,details}. + -- cgit v1.2.3 From 308d6638450f5ffc7f432302367e84bcd92ea683 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 Feb 2011 19:10:44 +0100 Subject: Rename Suite Callback to Common Test Hook --- lib/os_mon/test/cpu_sup_SUITE.erl | 2 +- lib/os_mon/test/disksup_SUITE.erl | 2 +- lib/os_mon/test/memsup_SUITE.erl | 2 +- lib/os_mon/test/os_mon_SUITE.erl | 2 +- lib/os_mon/test/os_mon_mib_SUITE.erl | 2 +- lib/os_mon/test/os_sup_SUITE.erl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/os_mon') diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl index 73dc901e8a..174317527c 100644 --- a/lib/os_mon/test/cpu_sup_SUITE.erl +++ b/lib/os_mon/test/cpu_sup_SUITE.erl @@ -56,7 +56,7 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> case test_server:os_type() of diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index f7fa5bb237..6e015ef74a 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -50,7 +50,7 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> Bugs = [otp_5910], diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl index d3aaa64233..afc14d1c83 100644 --- a/lib/os_mon/test/memsup_SUITE.erl +++ b/lib/os_mon/test/memsup_SUITE.erl @@ -49,7 +49,7 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), Config. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> All = case test_server:os_type() of diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl index a2f5317daf..dd0ab0fbba 100644 --- a/lib/os_mon/test/os_mon_SUITE.erl +++ b/lib/os_mon/test/os_mon_SUITE.erl @@ -39,7 +39,7 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> case test_server:os_type() of diff --git a/lib/os_mon/test/os_mon_mib_SUITE.erl b/lib/os_mon/test/os_mon_mib_SUITE.erl index 5d3ac4b7bd..01feb3a57c 100644 --- a/lib/os_mon/test/os_mon_mib_SUITE.erl +++ b/lib/os_mon/test/os_mon_mib_SUITE.erl @@ -78,7 +78,7 @@ end_per_testcase(_Case, Config) when is_list(Config) -> test_server:timetrap_cancel(Dog), Config. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [load_unload, get_mem_sys_mark, get_mem_proc_mark, diff --git a/lib/os_mon/test/os_sup_SUITE.erl b/lib/os_mon/test/os_sup_SUITE.erl index c606001dbd..873db06317 100644 --- a/lib/os_mon/test/os_sup_SUITE.erl +++ b/lib/os_mon/test/os_sup_SUITE.erl @@ -63,7 +63,7 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> case test_server:os_type() of -- cgit v1.2.3