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/cosTransactions/test/etrap_test_lib.erl | 2 +- lib/cosTransactions/test/generated_SUITE.erl | 4 ++-- lib/cosTransactions/test/transactions_SUITE.erl | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/etrap_test_lib.erl b/lib/cosTransactions/test/etrap_test_lib.erl index 913a94510f..18a1cda35b 100644 --- a/lib/cosTransactions/test/etrap_test_lib.erl +++ b/lib/cosTransactions/test/etrap_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% Copyright Ericsson AB 1999-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 diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index cc54eb168e..e3db56a991 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2009. All Rights Reserved. +%% Copyright Ericsson AB 2004-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 @@ -108,7 +108,7 @@ init_per_testcase(_Case, Config) -> [{watchdog, Dog}|Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index 8385d5a0fb..da6ef86e82 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% Copyright Ericsson AB 1999-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 @@ -37,7 +37,7 @@ %% External exports %%----------------------------------------------------------------- -export([all/1, cases/0, init_all/1, finish_all/1, resource_api/1, etrap_api/1, - init_per_testcase/2, fin_per_testcase/2, app_test/1]). + init_per_testcase/2, end_per_testcase/2, app_test/1]). %%----------------------------------------------------------------- %% Func: all/1 @@ -67,7 +67,7 @@ init_per_testcase(_Case, Config) -> [{watchdog, Dog}|Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> 'oe_etrap_test':'oe_unregister'(), 'oe_CosTransactions':'oe_unregister'(), Path = code:which(?MODULE), -- cgit v1.2.3 From 357687bd39fcedff912a0b6a95f1b60038eebd01 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:58:55 +0200 Subject: Update cosTransaction tests to conform with common_test standard --- lib/cosTransactions/test/cosTransactions.spec | 20 +--------- lib/cosTransactions/test/generated_SUITE.erl | 52 +++++++++++++++++-------- lib/cosTransactions/test/transactions_SUITE.erl | 31 +++++++++------ 3 files changed, 57 insertions(+), 46 deletions(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/cosTransactions.spec b/lib/cosTransactions/test/cosTransactions.spec index 8ad9259964..da226271c3 100644 --- a/lib/cosTransactions/test/cosTransactions.spec +++ b/lib/cosTransactions/test/cosTransactions.spec @@ -1,19 +1 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1999-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% -%% -{topcase, {dir, "../cosTransactions_test"}}. +{suites,"cosTransactions_test",all}. diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index e3db56a991..e72751ad34 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -26,7 +26,7 @@ -module(generated_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("orber/include/corba.hrl"). -define(default_timeout, ?t:minutes(3)). @@ -72,7 +72,7 @@ %%----------------------------------------------------------------- %% External exports %%----------------------------------------------------------------- --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). %%----------------------------------------------------------------- %% Internal exports @@ -85,20 +85,40 @@ %% Args: %% Returns: %%----------------------------------------------------------------- -all(doc) -> ["This suite is for testing IC generated files"]; -all(suite) -> - ['CosTransactions_Control', 'CosTransactions_Coordinator', - 'CosTransactions_HeuristicCommit', 'CosTransactions_HeuristicHazard', - 'CosTransactions_HeuristicMixed', 'CosTransactions_HeuristicRollback', - 'CosTransactions_Inactive', 'CosTransactions_InvalidControl', - 'CosTransactions_NoTransaction', 'CosTransactions_NotPrepared', - 'CosTransactions_NotSubtransaction', 'CosTransactions_RecoveryCoordinator', - 'CosTransactions_Resource', 'CosTransactions_SubtransactionAwareResource', - 'CosTransactions_SubtransactionsUnavailable', 'CosTransactions_Terminator', - 'CosTransactions_TransactionFactory', 'CosTransactions_Unavailable', - 'CosTransactions_SynchronizationUnavailable', 'CosTransactions_TransIdentity', - 'CosTransactions_PropagationContext', 'CosTransactions_otid_t', - 'CosTransactions_WrongTransaction', 'ETraP_Server']. +all() -> +['CosTransactions_Control', + 'CosTransactions_Coordinator', + 'CosTransactions_HeuristicCommit', + 'CosTransactions_HeuristicHazard', + 'CosTransactions_HeuristicMixed', + 'CosTransactions_HeuristicRollback', + 'CosTransactions_Inactive', + 'CosTransactions_InvalidControl', + 'CosTransactions_NoTransaction', + 'CosTransactions_NotPrepared', + 'CosTransactions_NotSubtransaction', + 'CosTransactions_RecoveryCoordinator', + 'CosTransactions_Resource', + 'CosTransactions_SubtransactionAwareResource', + 'CosTransactions_SubtransactionsUnavailable', + 'CosTransactions_Terminator', + 'CosTransactions_TransactionFactory', + 'CosTransactions_Unavailable', + 'CosTransactions_SynchronizationUnavailable', + 'CosTransactions_TransIdentity', + 'CosTransactions_PropagationContext', + 'CosTransactions_otid_t', + 'CosTransactions_WrongTransaction', 'ETraP_Server']. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%----------------------------------------------------------------- %% Init and cleanup functions. diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index da6ef86e82..9a8aa8981a 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -28,7 +28,7 @@ -include_lib("cosTransactions/include/CosTransactions.hrl"). -include("etrap_test_lib.hrl"). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(default_timeout, ?t:minutes(20)). @@ -36,21 +36,30 @@ %%----------------------------------------------------------------- %% External exports %%----------------------------------------------------------------- --export([all/1, cases/0, init_all/1, finish_all/1, resource_api/1, etrap_api/1, - init_per_testcase/2, end_per_testcase/2, app_test/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, cases/0, + init_per_suite/1, end_per_suite/1, resource_api/1, etrap_api/1, + init_per_testcase/2, end_per_testcase/2, app_test/1]). %%----------------------------------------------------------------- %% Func: all/1 %% Args: %% Returns: %%----------------------------------------------------------------- -all(doc) -> ["API tests for the cosTransactions interfaces", ""]; -all(suite) -> {req, - [mnesia, orber], - {conf, init_all, cases(), finish_all}}. +all() -> +cases(). + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + -cases() -> - [etrap_api, resource_api, app_test]. +cases() -> +[etrap_api, resource_api, app_test]. @@ -76,7 +85,7 @@ end_per_testcase(_Case, Config) -> test_server:timetrap_cancel(Dog), ok. -init_all(Config) -> +init_per_suite(Config) -> mnesia:delete_schema([node()]), mnesia:create_schema([node()]), orber:install([node()]), @@ -89,7 +98,7 @@ init_all(Config) -> exit("Config not a list") end. -finish_all(Config) -> +end_per_suite(Config) -> application:stop(orber), application:stop(mnesia), mnesia:delete_schema([node()]), -- 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/cosTransactions/test/generated_SUITE.erl | 4 +++- lib/cosTransactions/test/transactions_SUITE.erl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index e72751ad34..2b8498b46e 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -72,7 +72,7 @@ %%----------------------------------------------------------------- %% External 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]). %%----------------------------------------------------------------- %% Internal exports @@ -85,6 +85,8 @@ %% Args: %% Returns: %%----------------------------------------------------------------- +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> ['CosTransactions_Control', 'CosTransactions_Coordinator', diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index 9a8aa8981a..0f7eb52d15 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -36,7 +36,7 @@ %%----------------------------------------------------------------- %% External exports %%----------------------------------------------------------------- --export([all/0,groups/0,init_per_group/2,end_per_group/2, cases/0, +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, cases/0, init_per_suite/1, end_per_suite/1, resource_api/1, etrap_api/1, init_per_testcase/2, end_per_testcase/2, app_test/1]). @@ -45,6 +45,8 @@ %% Args: %% Returns: %%----------------------------------------------------------------- +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> cases(). -- 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/cosTransactions/test/generated_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index 2b8498b46e..f4a300fb0c 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -72,7 +72,7 @@ %%----------------------------------------------------------------- %% External 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]). %%----------------------------------------------------------------- %% Internal exports @@ -115,6 +115,12 @@ all() -> groups() -> []. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From 6a3d27a6522b5d48a36711dd8705ba33996a6f41 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 15:14:37 +0100 Subject: Fix formatting for cosTransactions --- lib/cosTransactions/test/generated_SUITE.erl | 54 ++++++++++++------------- lib/cosTransactions/test/transactions_SUITE.erl | 10 ++--- 2 files changed, 32 insertions(+), 32 deletions(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index f4a300fb0c..20988b53f1 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -72,12 +72,12 @@ %%----------------------------------------------------------------- %% External 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]). %%----------------------------------------------------------------- %% Internal exports %%----------------------------------------------------------------- --export([]). -compile(export_all). %%----------------------------------------------------------------- @@ -88,29 +88,29 @@ suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -['CosTransactions_Control', - 'CosTransactions_Coordinator', - 'CosTransactions_HeuristicCommit', - 'CosTransactions_HeuristicHazard', - 'CosTransactions_HeuristicMixed', - 'CosTransactions_HeuristicRollback', - 'CosTransactions_Inactive', - 'CosTransactions_InvalidControl', - 'CosTransactions_NoTransaction', - 'CosTransactions_NotPrepared', - 'CosTransactions_NotSubtransaction', - 'CosTransactions_RecoveryCoordinator', - 'CosTransactions_Resource', - 'CosTransactions_SubtransactionAwareResource', - 'CosTransactions_SubtransactionsUnavailable', - 'CosTransactions_Terminator', - 'CosTransactions_TransactionFactory', - 'CosTransactions_Unavailable', - 'CosTransactions_SynchronizationUnavailable', - 'CosTransactions_TransIdentity', - 'CosTransactions_PropagationContext', - 'CosTransactions_otid_t', - 'CosTransactions_WrongTransaction', 'ETraP_Server']. + ['CosTransactions_Control', + 'CosTransactions_Coordinator', + 'CosTransactions_HeuristicCommit', + 'CosTransactions_HeuristicHazard', + 'CosTransactions_HeuristicMixed', + 'CosTransactions_HeuristicRollback', + 'CosTransactions_Inactive', + 'CosTransactions_InvalidControl', + 'CosTransactions_NoTransaction', + 'CosTransactions_NotPrepared', + 'CosTransactions_NotSubtransaction', + 'CosTransactions_RecoveryCoordinator', + 'CosTransactions_Resource', + 'CosTransactions_SubtransactionAwareResource', + 'CosTransactions_SubtransactionsUnavailable', + 'CosTransactions_Terminator', + 'CosTransactions_TransactionFactory', + 'CosTransactions_Unavailable', + 'CosTransactions_SynchronizationUnavailable', + 'CosTransactions_TransIdentity', + 'CosTransactions_PropagationContext', + 'CosTransactions_otid_t', + 'CosTransactions_WrongTransaction', 'ETraP_Server']. groups() -> []. @@ -122,10 +122,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. %%----------------------------------------------------------------- diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index 0f7eb52d15..3727d94e67 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -48,20 +48,20 @@ suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -cases(). + cases(). groups() -> []. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. + - cases() -> -[etrap_api, resource_api, app_test]. + [etrap_api, resource_api, app_test]. -- 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/cosTransactions/test/cosTransactions.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/cosTransactions.spec b/lib/cosTransactions/test/cosTransactions.spec index da226271c3..9918c8ca16 100644 --- a/lib/cosTransactions/test/cosTransactions.spec +++ b/lib/cosTransactions/test/cosTransactions.spec @@ -1 +1 @@ -{suites,"cosTransactions_test",all}. +{suites,"../cosTransactions_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/cosTransactions/test/Makefile | 3 ++- lib/cosTransactions/test/cosTransactions.cover | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 lib/cosTransactions/test/cosTransactions.cover (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/Makefile b/lib/cosTransactions/test/Makefile index 8b1264d404..6bc532aa82 100644 --- a/lib/cosTransactions/test/Makefile +++ b/lib/cosTransactions/test/Makefile @@ -38,6 +38,7 @@ RELSYSDIR = $(RELEASE_PATH)/cosTransactions_test # Target Specs # ---------------------------------------------------- TEST_SPEC_FILE = cosTransactions.spec +COVER_FILE = cosTransactions.cover IDL_FILES = \ @@ -142,7 +143,7 @@ release_docs_spec: release_tests_spec: tests $(INSTALL_DIR) $(RELSYSDIR) $(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) \ - $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR) + $(COVER_FILE) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR) $(INSTALL_DATA) $(SUITE_TARGET_FILES) $(RELSYSDIR) $(INSTALL_DIR) $(RELSYSDIR)/$(IDLOUTDIR) $(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \ diff --git a/lib/cosTransactions/test/cosTransactions.cover b/lib/cosTransactions/test/cosTransactions.cover new file mode 100644 index 0000000000..b27bae999d --- /dev/null +++ b/lib/cosTransactions/test/cosTransactions.cover @@ -0,0 +1,2 @@ +{incl_app,cosTransactions,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/cosTransactions/test/generated_SUITE.erl | 2 +- lib/cosTransactions/test/transactions_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/cosTransactions') diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl index 20988b53f1..65a94266ab 100644 --- a/lib/cosTransactions/test/generated_SUITE.erl +++ b/lib/cosTransactions/test/generated_SUITE.erl @@ -85,7 +85,7 @@ %% Args: %% Returns: %%----------------------------------------------------------------- -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> ['CosTransactions_Control', diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl index 3727d94e67..27272eeb40 100644 --- a/lib/cosTransactions/test/transactions_SUITE.erl +++ b/lib/cosTransactions/test/transactions_SUITE.erl @@ -45,7 +45,7 @@ %% Args: %% Returns: %%----------------------------------------------------------------- -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> cases(). -- cgit v1.2.3