From 4a1a40f8ce37e1790c0b519ba2e339b8dc96d770 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:30:46 +0200 Subject: Update tools tests to conform with common_test standard --- lib/tools/test/fprof_SUITE.erl | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'lib/tools/test/fprof_SUITE.erl') diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index 1cd9ac7824..5ecb150e09 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -18,10 +18,10 @@ %% -module(fprof_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server framework exports --export([all/1, not_run/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, not_run/1]). %% Test suites -export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1, @@ -54,17 +54,24 @@ -all(doc) -> - ["Test the 'fprof' profiling tool."]; -all(suite) -> - case test_server:is_native(?MODULE) of - true -> - [not_run]; - false -> - [stack_seq, tail_seq, create_file_slow, spawn_simple, - imm_tail_seq, imm_create_file_slow, imm_compile, - cpu_create_file_slow] - end. +all() -> +case test_server:is_native(fprof_SUITE) of + true -> [not_run]; + false -> + [stack_seq, tail_seq, create_file_slow, spawn_simple, + imm_tail_seq, imm_create_file_slow, imm_compile, + cpu_create_file_slow] +end. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + not_run(Config) when is_list(Config) -> {skipped, "Native code"}. -- 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/tools/test/fprof_SUITE.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/tools/test/fprof_SUITE.erl') diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index 5ecb150e09..98033560c3 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -21,7 +21,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server framework exports --export([all/0,groups/0,init_per_group/2,end_per_group/2, not_run/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, not_run/1]). %% Test suites -export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1, @@ -54,6 +54,8 @@ +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> case test_server:is_native(fprof_SUITE) of true -> [not_run]; -- 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/tools/test/fprof_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/tools/test/fprof_SUITE.erl') diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index 98033560c3..3cfff2473f 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -21,7 +21,7 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server framework exports --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, not_run/1]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, not_run/1]). %% Test suites -export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1, @@ -68,6 +68,12 @@ end. groups() -> []. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From 307dc266144daa134fc37495362af55a95c06f74 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 17:52:01 +0100 Subject: Fix formatting for tools --- lib/tools/test/fprof_SUITE.erl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/tools/test/fprof_SUITE.erl') diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index 3cfff2473f..82a7e81d44 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -21,7 +21,8 @@ -include_lib("test_server/include/test_server.hrl"). %% Test server framework exports --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, not_run/1]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, not_run/1]). %% Test suites -export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1, @@ -57,13 +58,13 @@ suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -case test_server:is_native(fprof_SUITE) of - true -> [not_run]; - false -> - [stack_seq, tail_seq, create_file_slow, spawn_simple, - imm_tail_seq, imm_create_file_slow, imm_compile, - cpu_create_file_slow] -end. + case test_server:is_native(fprof_SUITE) of + true -> [not_run]; + false -> + [stack_seq, tail_seq, create_file_slow, spawn_simple, + imm_tail_seq, imm_create_file_slow, imm_compile, + cpu_create_file_slow] + end. groups() -> []. @@ -75,10 +76,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. not_run(Config) when is_list(Config) -> -- 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/tools/test/fprof_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tools/test/fprof_SUITE.erl') diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index 82a7e81d44..78de77526c 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -55,7 +55,7 @@ -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> case test_server:is_native(fprof_SUITE) of -- cgit v1.2.3