diff options
author | Lukas Larsson <lukas@erix.ericsson.se> | 2010-12-09 11:52:58 +0100 |
---|---|---|
committer | Lukas Larsson <lukas@erix.ericsson.se> | 2010-12-09 11:52:58 +0100 |
commit | 5f19d44a842ae4d6b1b977273308edb1131cb8d0 (patch) | |
tree | 8002139f507215c2d376d051046c022135fba3ce /lib/common_test/test | |
parent | 7f25a132488707b167d1d5b3c59ba58b0600e848 (diff) | |
download | otp-5f19d44a842ae4d6b1b977273308edb1131cb8d0.tar.gz otp-5f19d44a842ae4d6b1b977273308edb1131cb8d0.tar.bz2 otp-5f19d44a842ae4d6b1b977273308edb1131cb8d0.zip |
Add test suites for failing in init/1 function
Diffstat (limited to 'lib/common_test/test')
2 files changed, 84 insertions, 0 deletions
diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/crash_init_scb.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/crash_init_scb.erl new file mode 100644 index 0000000000..683459853f --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/crash_init_scb.erl @@ -0,0 +1,34 @@ +%%
+%% %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(crash_init_scb).
+
+
+-include_lib("common_test/src/ct_util.hrl").
+-include_lib("common_test/include/ct_event.hrl").
+
+
+%% Suite Callbacks
+-export([init/1]).
+
+init(Opts) ->
+ empty_scb:init(Opts),
+ exit(diediedie).
+
diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_exit_in_init_scope_suite_scb_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_exit_in_init_scope_suite_scb_SUITE.erl new file mode 100644 index 0000000000..bfaeb7ca3a --- /dev/null +++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_exit_in_init_scope_suite_scb_SUITE.erl @@ -0,0 +1,50 @@ +%%
+%% %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_exit_in_init_scope_suite_scb_SUITE).
+
+-suite_defaults([{timetrap, {minutes, 10}}]).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+%% Test server callback functions
+suite() ->
+ [{suite_callbacks,[crash_init_scb]}].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_testcase(_TestCase, Config) ->
+ Config.
+
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+all() ->
+ [test_case].
+
+%% Test cases starts here.
+test_case(Config) when is_list(Config) ->
+ ok.
|