From c9383e50b2df112fc7c5a5e6f4d23ecdc43adfbb Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 18 Nov 2010 18:21:26 +0100 Subject: Add scoping test cases --- .../scb/tests/ct_scope_group_scb_SUITE.erl | 120 +++++++++++++++++++++ .../scb/tests/ct_scope_per_group_scb_SUITE.erl | 120 +++++++++++++++++++++ .../scb/tests/ct_scope_per_suite_scb_SUITE.erl | 110 +++++++++++++++++++ .../scb/tests/ct_scope_per_tc_scb_SUITE.erl | 110 +++++++++++++++++++ .../scb/tests/ct_scope_suite_scb_SUITE.erl | 112 +++++++++++++++++++ .../scb/tests/ct_scope_tc_scb_SUITE.erl | 110 +++++++++++++++++++ 6 files changed, 682 insertions(+) create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_group_scb_SUITE.erl create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_group_scb_SUITE.erl create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_suite_scb_SUITE.erl create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_tc_scb_SUITE.erl create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_suite_scb_SUITE.erl create mode 100644 lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_tc_scb_SUITE.erl (limited to 'lib/common_test/test/ct_suite_callback_SUITE_data/scb') diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_group_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_group_scb_SUITE.erl new file mode 100644 index 0000000000..70fcea6fea --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_group_scb_SUITE.erl @@ -0,0 +1,120 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_group_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +init_per_group(GroupName, Config) -> + Config. + +end_per_group(GroupName, Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [{group,group1}]. + +groups() -> + [{group1,[],[test_case]}]. + + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_group_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_group_scb_SUITE.erl new file mode 100644 index 0000000000..cbda931f5e --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_group_scb_SUITE.erl @@ -0,0 +1,120 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_per_group_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +init_per_group(GroupName, Config) -> + [{suite_callbacks,[empty_scb]}|Config]. + +end_per_group(GroupName, Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [{group,group1}]. + +groups() -> + [{group1,[],[test_case]}]. + + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_suite_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_suite_scb_SUITE.erl new file mode 100644 index 0000000000..fef00ed4f3 --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_suite_scb_SUITE.erl @@ -0,0 +1,110 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_per_suite_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + [{suite_callbacks,[empty_scb]}|Config]. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [test_case]. + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_tc_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_tc_scb_SUITE.erl new file mode 100644 index 0000000000..d99e741553 --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_per_tc_scb_SUITE.erl @@ -0,0 +1,110 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_per_tc_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + [{suite_callbacks,[empty_scb]}|Config]. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [test_case]. + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_suite_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_suite_scb_SUITE.erl new file mode 100644 index 0000000000..2e32773336 --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_suite_scb_SUITE.erl @@ -0,0 +1,112 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_suite_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +suite() -> + [{suite_callbacks,[empty_scb]}]. +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + [{suite_callbacks,[empty_scb]}|Config]. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [test_case]. + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_tc_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_tc_scb_SUITE.erl new file mode 100644 index 0000000000..cb894e49e4 --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scope_tc_scb_SUITE.erl @@ -0,0 +1,110 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +-module(ct_scope_tc_scb_SUITE). + +-suite_defaults([{timetrap, {minutes, 10}}]). + +%% Note: This directive should only be used in test suites. +-compile(export_all). + +-include("ct.hrl"). + +%% Test server callback functions +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before the whole suite +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% +%% @spec init_per_suite(Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_suite(Config) -> + Config. + +%%-------------------------------------------------------------------- +%% @doc +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after the whole suite +%% +%% @spec end_per_suite(Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_suite(_Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Initiation before each test case +%% +%% Note: This function is free to add any key/value pairs to the Config +%% variable, but should NOT alter/remove any existing entries. +%% Initiation before each test case +%% +%% @spec init_per_testcase(TestCase, Config) -> Config +%% @end +%%-------------------------------------------------------------------- +init_per_testcase(_TestCase, Config) -> + [{suite_callbacks,[empty_scb]}|Config]. + +%%-------------------------------------------------------------------- +%% @doc +%% Case - atom() +%% Name of the test case that is about to be run. +%% Config - [tuple()] +%% A list of key/value pairs, holding the test case configuration. +%% +%% Cleanup after each test case +%% +%% @spec end_per_testcase(TestCase, Config) -> _ +%% @end +%%-------------------------------------------------------------------- +end_per_testcase(_TestCase, _Config) -> + ok. + +%%-------------------------------------------------------------------- +%% @doc +%% TestCases - [Case] +%% Case - atom() +%% Name of a test case. +%% +%% Returns a list of all test cases in this test suite +%% +%% @spec all() -> TestCases +%% @end +%%-------------------------------------------------------------------- +all() -> + [test_case]. + +%% Test cases starts here. +%%-------------------------------------------------------------------- +test_case(Config) when is_list(Config) -> + ok. -- cgit v1.2.3