diff options
Diffstat (limited to 'lib/ic')
-rw-r--r-- | lib/ic/doc/src/notes.xml | 20 | ||||
-rw-r--r-- | lib/ic/src/ic_forms.erl | 6 | ||||
-rw-r--r-- | lib/ic/src/ic_pragma.erl | 12 | ||||
-rw-r--r-- | lib/ic/src/ic_symtab.erl | 4 | ||||
-rw-r--r-- | lib/ic/src/icforms.hrl | 3 | ||||
-rw-r--r-- | lib/ic/src/icparse.yrl | 22 | ||||
-rw-r--r-- | lib/ic/src/ictype.erl | 41 | ||||
-rw-r--r-- | lib/ic/test/Makefile | 4 | ||||
-rw-r--r-- | lib/ic/test/c_client_erl_server_SUITE.erl | 51 | ||||
-rw-r--r-- | lib/ic/test/c_client_erl_server_proto_SUITE.erl | 51 | ||||
-rw-r--r-- | lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl | 53 | ||||
-rw-r--r-- | lib/ic/test/erl_client_c_server_SUITE.erl | 48 | ||||
-rw-r--r-- | lib/ic/test/erl_client_c_server_proto_SUITE.erl | 48 | ||||
-rw-r--r-- | lib/ic/test/ic.cover | 2 | ||||
-rw-r--r-- | lib/ic/test/ic.spec | 2 | ||||
-rw-r--r-- | lib/ic/test/ic_SUITE.erl | 99 | ||||
-rw-r--r-- | lib/ic/test/ic_be_SUITE.erl | 28 | ||||
-rw-r--r-- | lib/ic/test/ic_pp_SUITE.erl | 107 | ||||
-rw-r--r-- | lib/ic/test/ic_pragma_SUITE.erl | 33 | ||||
-rw-r--r-- | lib/ic/test/ic_register_SUITE.erl | 36 | ||||
-rw-r--r-- | lib/ic/test/java_client_erl_server_SUITE.erl | 42 | ||||
-rw-r--r-- | lib/ic/vsn.mk | 2 |
22 files changed, 438 insertions, 276 deletions
diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml index 6684547572..5f6c31069c 100644 --- a/lib/ic/doc/src/notes.xml +++ b/lib/ic/doc/src/notes.xml @@ -31,6 +31,26 @@ </header> <section> + <title>IC 4.2.26</title> + + <section> + <title>Improvements and New Features</title> + <list type="bulleted"> + <item> + <p> + Partial support for recursive structs and unions. Only available + for the erl_corba backend and requires that Light IFR is used. + I.e. the IC option {light_ifr, true} and that Orber is configured + in such a way that Light IFR is activated. Recursive TypeCode is + currently not supported.</p> + <p> + Own Id: OTP-8868 Aux Id: seq11633</p> + </item> + </list> + </section> + </section> + + <section> <title>IC 4.2.25</title> <section> diff --git a/lib/ic/src/ic_forms.erl b/lib/ic/src/ic_forms.erl index 7409ddeb7b..fc46a2ed40 100644 --- a/lib/ic/src/ic_forms.erl +++ b/lib/ic/src/ic_forms.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -65,6 +65,7 @@ get_line(X) when is_record(X, scoped_id) -> X#scoped_id.line; get_line(X) when is_record(X, module) -> get_line(X#module.id); get_line(X) when is_record(X, interface) -> get_line(X#interface.id); get_line(X) when is_record(X, forward) -> get_line(X#forward.id); +get_line(X) when is_record(X, constr_forward) -> get_line(X#constr_forward.id); get_line(X) when is_record(X, const) -> get_line(X#const.id); get_line(X) when is_record(X, typedef) -> get_line(X#typedef.id); get_line(X) when is_record(X, struct) -> get_line(X#struct.id); @@ -114,6 +115,7 @@ get_line(_) -> -1. get_id2(X) when is_record(X, module) -> get_id(X#module.id); get_id2(X) when is_record(X, interface) -> get_id(X#interface.id); get_id2(X) when is_record(X, forward) -> get_id(X#forward.id); +get_id2(X) when is_record(X, constr_forward) -> get_id(X#constr_forward.id); get_id2(X) when is_record(X, const) -> get_id(X#const.id); get_id2(X) when is_record(X, typedef) -> get_id(hd(X#typedef.id)); get_id2(X) when is_record(X, struct) -> get_id(X#struct.id); @@ -156,6 +158,7 @@ get_type(X) when is_record(X, param) -> X#param.type. %% Temporary place get_tk(X) when is_record(X, interface) -> X#interface.tk; get_tk(X) when is_record(X, forward) -> X#forward.tk; +get_tk(X) when is_record(X, constr_forward) -> X#constr_forward.tk; get_tk(X) when is_record(X, const) -> X#const.tk; get_tk(X) when is_record(X, type_dcl) -> X#type_dcl.tk; get_tk(X) when is_record(X, typedef) -> X#typedef.tk; @@ -228,6 +231,7 @@ clean_up_scope([N|Ns],Found) -> get_type_code2(_, _, X) when is_record(X, interface) -> X#interface.tk; get_type_code2(_, _, X) when is_record(X, forward) -> X#forward.tk; +get_type_code2(_, _, X) when is_record(X, constr_forward) -> X#constr_forward.tk; get_type_code2(_, _, X) when is_record(X, const) -> X#const.tk; get_type_code2(_, _, X) when is_record(X, type_dcl) -> X#type_dcl.tk; get_type_code2(_, _, X) when is_record(X, typedef) -> diff --git a/lib/ic/src/ic_pragma.erl b/lib/ic/src/ic_pragma.erl index 9165e3b03b..45cb64c9c8 100644 --- a/lib/ic/src/ic_pragma.erl +++ b/lib/ic/src/ic_pragma.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -60,7 +60,7 @@ pragma_reg(G,X) -> init_pragma_status(S), registerOptions(G,S), pragma_reg_all(G, S, [], X), - denote_specific_code_opts(G), %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + denote_specific_code_opts(G), case get_pragma_compilation_status(S) of true -> %% Remove ugly pragmas from form @@ -132,6 +132,7 @@ applyCodeOpt(G) -> %% This removes all pragma records from the form. %% When debugged, it can be enbodied in pragma_reg_all. +cleanup(undefined,C) -> C; cleanup([],C) -> C; cleanup([X|Xs],CSF) -> cleanup(Xs, CSF++cleanup(X)). @@ -279,7 +280,12 @@ pragma_reg(G, S, N, X) when is_record(X, union) -> pragma_reg(G, S, N, X) when is_record(X, struct) -> mk_ref(G,[get_id2(X) | N],struct_ref), mk_file_data(G,X,N,struct), - pragma_reg_all(G, S, N, X#struct.body); + case X#struct.body of + undefined -> + ok; + _ -> + pragma_reg_all(G, S, N, X#struct.body) + end; pragma_reg(G, _S, N, X) when is_record(X, attr) -> XX = #id_of{type=X}, diff --git a/lib/ic/src/ic_symtab.erl b/lib/ic/src/ic_symtab.erl index 889c75e3a2..d710154a5d 100644 --- a/lib/ic/src/ic_symtab.erl +++ b/lib/ic/src/ic_symtab.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -69,6 +69,8 @@ store(G, N, X) -> ets:insert(G#genobj.symtab, {Name, X}); {ok, Y} when is_record(Y, forward) -> ets:insert(G#genobj.symtab, {Name, X}); + {ok, Y} when is_record(Y, constr_forward) -> + ets:insert(G#genobj.symtab, {Name, X}); {ok, _Y} -> ic_error:error(G, {multiply_defined, X}) end. diff --git a/lib/ic/src/icforms.hrl b/lib/ic/src/icforms.hrl index d1869e6330..1b394a11b4 100644 --- a/lib/ic/src/icforms.hrl +++ b/lib/ic/src/icforms.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2009. All Rights Reserved. +%% Copyright Ericsson AB 1997-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 @@ -34,6 +34,7 @@ -record(module, {id, body}). -record(interface, {id, inherit, body, inherit_body, tk}). -record(forward, {id, tk}). +-record(constr_forward, {id, tk}). -record(const, {type, id, val, tk}). -record(type_dcl, {type, tk}). -record(typedef, {type, id, tk}). diff --git a/lib/ic/src/icparse.yrl b/lib/ic/src/icparse.yrl index 25b0f452e7..d0dd6cde4c 100644 --- a/lib/ic/src/icparse.yrl +++ b/lib/ic/src/icparse.yrl @@ -1,21 +1,20 @@ -%%<copyright> -%% <year>1997-2007</year> -%% <holder>Ericsson AB, All Rights Reserved</holder> -%%</copyright> -%%<legalnotice> +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1997-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. -%% -%% The Initial Developer of the Original Code is Ericsson AB. -%%</legalnotice> +%% +%% %CopyrightEnd% %% %%------------------------------------------------------------ %% Yecc spec for IDL @@ -150,6 +149,7 @@ Nonterminals 'ZorM_<integer_literal>' '<fixed_pt_type>' '<fixed_pt_const_type>' + '<constr_forward_decl>' . @@ -473,6 +473,7 @@ OE_preproc -> '#' '<integer_literal>' '<string_literal>' '<type_dcl>' -> '<struct_type>' : '$1' . '<type_dcl>' -> '<union_type>' : '$1' . '<type_dcl>' -> '<enum_type>' : '$1' . +'<type_dcl>' -> '<constr_forward_decl>' : '$1' . %% (28) NIY multiple declarators (FIXED) '<type_declarator>' -> '<type_spec>' '<declarators>' @@ -832,6 +833,9 @@ OE_preproc -> '#' '<integer_literal>' '<string_literal>' '<fixed_pt_type>' -> 'fixed' '<' '<positive_int_const>' ',' '<positive_int_const>' '>' : #fixed{digits='$3',scale='$5'} . +%% (99) +'<constr_forward_decl>' -> 'struct' '<identifier>' : #constr_forward{id='$2', tk=tk_struct} . +'<constr_forward_decl>' -> 'union' '<identifier>' : #constr_forward{id='$2', tk=tk_union} . %% Added clause 'ZorM_<string_literal>' -> '$empty' : [] . diff --git a/lib/ic/src/ictype.erl b/lib/ic/src/ictype.erl index 4704191bee..9e20801464 100644 --- a/lib/ic/src/ictype.erl +++ b/lib/ic/src/ictype.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2009. All Rights Reserved. +%% Copyright Ericsson AB 1997-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 @@ -407,6 +407,18 @@ check(G, S, N, X) when is_record(X, forward) -> tktab_add(G, S, N, X, {tk_objref, ictk:get_IR_ID(G, N, X), ic_forms:get_id2(X)}), X; +check(G, S, N, #constr_forward{tk = tk_struct} = X) -> + ?STDDBG, + ID = ic_forms:get_id2(X), + Module = list_to_atom(string:join(lists:reverse([ID|N]), "_")), + tktab_add(G, S, N, X, {tk_struct, ictk:get_IR_ID(G, N, X), ID, Module}), + X; +check(G, S, N, #constr_forward{tk = tk_union} = X) -> + ?STDDBG, + ID = ic_forms:get_id2(X), + Module = list_to_atom(string:join(lists:reverse([ID|N]), "_")), + tktab_add(G, S, N, X, {tk_union, ictk:get_IR_ID(G, N, X), ID, [], [], Module}), + X; check(G, S, N, X) when is_record(X, const) -> ?STDDBG, @@ -427,21 +439,6 @@ check(G, S, N, X) when is_record(X, const) -> end end; -check(G, S, N, X) when is_record(X, const) -> - ?STDDBG, - case tk_base(G, S, N, ic_forms:get_type(X)) of - Err when element(1, Err) == error -> X; - TK -> - check_const_tk(G, S, N, X, TK), - case iceval:eval_const(G, S, N, TK, X#const.val) of - Err when element(1, Err) == error -> X; - Val -> - V = iceval:get_val(Val), - tktab_add(G, S, N, X, TK, V), - X#const{val=V, tk=TK} - end - end; - check(G, S, N, X) when is_record(X, except) -> ?STDDBG, TK = tk(G, S, N, X), @@ -795,9 +792,15 @@ tktab_add_id(G, S, N, X, Id, TK, Aux) -> Name = [Id | N], UName = mk_uppercase(Name), case ets:lookup(S, Name) of - [{_, forward, _, _}] when is_record(X, interface) -> ok; - [XX] when is_record(X, forward) andalso element(2, XX)==interface -> ok; - [_] -> ic_error:error(G, {multiply_defined, X}); + [{_, forward, _, _}] when is_record(X, interface) -> + ok; + [{_, constr_forward, _, _}] when is_record(X, union) orelse + is_record(X, struct) -> + ok; + [XX] when is_record(X, forward) andalso element(2, XX)==interface -> + ok; + [_] -> + ic_error:error(G, {multiply_defined, X}); [] -> case ets:lookup(S, UName) of [] -> ok; diff --git a/lib/ic/test/Makefile b/lib/ic/test/Makefile index 1142159d19..988e7e7985 100644 --- a/lib/ic/test/Makefile +++ b/lib/ic/test/Makefile @@ -33,7 +33,7 @@ RELSYSDIR = $(RELEASE_PATH)/ic_test # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- -TEST_SPEC_FILE = ic.spec ic.spec.vxworks +TEST_SPEC_FILE = ic.spec IDL_FILES = @@ -251,7 +251,7 @@ release_tests_spec: tests $(INSTALL_DIR) $(RELSYSDIR)/erl_client_c_server_SUITE_data $(INSTALL_DIR) $(RELSYSDIR)/erl_client_c_server_proto_SUITE_data $(INSTALL_DIR) $(RELSYSDIR)/java_client_erl_server_SUITE_data - $(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) $(ERL_FILES) \ + $(INSTALL_DATA) $(IDL_FILES) ic.cover $(TEST_SPEC_FILE) $(ERL_FILES) \ $(RELSYSDIR) $(INSTALL_DATA) $(COMPILER_TEST_FILES) $(RELSYSDIR)/ic_SUITE_data $(INSTALL_DATA) $(COMPILER_TEST_FILES2) \ diff --git a/lib/ic/test/c_client_erl_server_SUITE.erl b/lib/ic/test/c_client_erl_server_SUITE.erl index 40c1395d10..038172c311 100644 --- a/lib/ic/test/c_client_erl_server_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-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 @@ -24,10 +24,12 @@ -module(c_client_erl_server_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). --export([init_per_testcase/2, fin_per_testcase/2, - all/1, void_test/1, long_test/1, long_long_test/1, +-export([init_per_testcase/2, end_per_testcase/2, + all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + void_test/1, long_test/1, long_long_test/1, unsigned_short_test/1, unsigned_long_test/1, unsigned_long_long_test/1, double_test/1, char_test/1, wchar_test/1, octet_test/1, bool_test/1, struct_test/1, @@ -57,25 +59,40 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(?DEFAULT_TIMEOUT), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), test_server:timetrap_cancel(WatchDog). -all(doc) -> - "Test of IC with a C-client and an Erlang generic server. " - "The communication is via Erlang distribution."; -all(suite) -> - [void_test, long_test, long_long_test, unsigned_short_test, - unsigned_long_test, unsigned_long_long_test, double_test, - char_test, wchar_test, octet_test, bool_test, struct_test, - struct2_test, seq1_test, seq2_test, seq3_test, seq4_test, - seq5_test, array1_test, array2_test, enum_test, string1_test, - string2_test, string3_test, string4_test, pid_test, port_test, - ref_test, term_test, typedef_test, inline_sequence_test, - term_sequence_test, term_struct_test, wstring1_test]. +suite() -> [{ct_hooks,[ts_install_cth]}]. +all() -> + [void_test, long_test, long_long_test, + unsigned_short_test, unsigned_long_test, + unsigned_long_long_test, double_test, char_test, + wchar_test, octet_test, bool_test, struct_test, + struct2_test, seq1_test, seq2_test, seq3_test, + seq4_test, seq5_test, array1_test, array2_test, + enum_test, string1_test, string2_test, string3_test, + string4_test, pid_test, port_test, ref_test, term_test, + typedef_test, inline_sequence_test, term_sequence_test, + term_struct_test, wstring1_test]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. array1_test(doc) -> ""; array1_test(suite) -> []; diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_SUITE.erl index 58309a2221..172e4de6d1 100644 --- a/lib/ic/test/c_client_erl_server_proto_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_proto_SUITE.erl @@ -1,7 +1,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 @@ -23,10 +23,12 @@ %%---------------------------------------------------------------------- -module(c_client_erl_server_proto_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). --export([init_per_testcase/2, fin_per_testcase/2, - all/1, void_test/1, long_test/1, long_long_test/1, +-export([init_per_testcase/2, end_per_testcase/2, + all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + void_test/1, long_test/1, long_long_test/1, unsigned_short_test/1, unsigned_long_test/1, unsigned_long_long_test/1, double_test/1, char_test/1, wchar_test/1, octet_test/1, bool_test/1, struct_test/1, @@ -56,25 +58,40 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(?DEFAULT_TIMEOUT), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), test_server:timetrap_cancel(WatchDog). -all(doc) -> - "Test of IC with a C-client and an Erlang generic server. " - "The communication is via Erlang distribution."; -all(suite) -> - [void_test, long_test, long_long_test, unsigned_short_test, - unsigned_long_test, unsigned_long_long_test, double_test, - char_test, wchar_test, octet_test, bool_test, struct_test, - struct2_test, seq1_test, seq2_test, seq3_test, seq4_test, - seq5_test, array1_test, array2_test, enum_test, string1_test, - string2_test, string3_test, string4_test, pid_test, port_test, - ref_test, term_test, typedef_test, inline_sequence_test, - term_sequence_test, term_struct_test, wstring1_test]. +suite() -> [{ct_hooks,[ts_install_cth]}]. +all() -> + [void_test, long_test, long_long_test, + unsigned_short_test, unsigned_long_test, + unsigned_long_long_test, double_test, char_test, + wchar_test, octet_test, bool_test, struct_test, + struct2_test, seq1_test, seq2_test, seq3_test, + seq4_test, seq5_test, array1_test, array2_test, + enum_test, string1_test, string2_test, string3_test, + string4_test, pid_test, port_test, ref_test, term_test, + typedef_test, inline_sequence_test, term_sequence_test, + term_struct_test, wstring1_test]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. array1_test(doc) -> ""; array1_test(suite) -> []; diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl index 595c5bf483..53bf99c917 100644 --- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl +++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl @@ -1,7 +1,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 @@ -23,10 +23,12 @@ %%---------------------------------------------------------------------- -module(c_client_erl_server_proto_tmo_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). --export([init_per_testcase/2, fin_per_testcase/2, - all/1, void_test/1, long_test/1, long_long_test/1, +-export([init_per_testcase/2, end_per_testcase/2, + all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + void_test/1, long_test/1, long_long_test/1, unsigned_short_test/1, unsigned_long_test/1, unsigned_long_long_test/1, double_test/1, char_test/1, wchar_test/1, octet_test/1, bool_test/1, struct_test/1, @@ -56,24 +58,41 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(?DEFAULT_TIMEOUT), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), test_server:timetrap_cancel(WatchDog). -all(doc) -> - "Test of IC with a C-client and an Erlang generic server. " - "The communication is via Erlang distribution."; -all(suite) -> - [void_test, long_test, long_long_test, unsigned_short_test, - unsigned_long_test, unsigned_long_long_test, double_test, - char_test, wchar_test, octet_test, bool_test, struct_test, - struct2_test, seq1_test, seq2_test, seq3_test, seq4_test, - seq5_test, array1_test, array2_test, enum_test, string1_test, - string2_test, string3_test, string4_test, pid_test, port_test, - ref_test, term_test, typedef_test, inline_sequence_test, - term_sequence_test, term_struct_test, wstring1_test]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [void_test, long_test, long_long_test, + unsigned_short_test, unsigned_long_test, + unsigned_long_long_test, double_test, char_test, + wchar_test, octet_test, bool_test, struct_test, + struct2_test, seq1_test, seq2_test, seq3_test, + seq4_test, seq5_test, array1_test, array2_test, + enum_test, string1_test, string2_test, string3_test, + string4_test, pid_test, port_test, ref_test, term_test, + typedef_test, inline_sequence_test, term_sequence_test, + term_struct_test, wstring1_test]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + array1_test(doc) -> ""; diff --git a/lib/ic/test/erl_client_c_server_SUITE.erl b/lib/ic/test/erl_client_c_server_SUITE.erl index c5f5b6a218..a42dbb9604 100644 --- a/lib/ic/test/erl_client_c_server_SUITE.erl +++ b/lib/ic/test/erl_client_c_server_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2009. All Rights Reserved. +%% Copyright Ericsson AB 2002-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 @@ -24,9 +24,9 @@ -module(erl_client_c_server_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). --export([init_per_testcase/2, fin_per_testcase/2, all/1, void_test/1, +-export([init_per_testcase/2, end_per_testcase/2,all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, void_test/1, long_test/1, longlong_test/1, ushort_test/1, ulong_test/1, ulonglong_test/1, double_test/1, char_test/1, wchar_test/1, octet_test/1, bool_test/1, struct_test/1, struct2_test/1, @@ -57,24 +57,40 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(?DEFAULT_TIMEOUT), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), test_server:timetrap_cancel(WatchDog). -all(doc) -> - "Test of IC with an Erlang client and a C server. " - "The communication is via Erlang distribution."; -all(suite) -> - [void_test, long_test, longlong_test, ushort_test, - ulong_test, ulonglong_test, double_test, - char_test, wchar_test, octet_test, bool_test, struct_test, - struct2_test, seq1_test, seq2_test, seq3_test, seq4_test, - seq5_test, array1_test, array2_test, enum_test, string1_test, - string2_test, string3_test, string4_test, pid_test, port_test, - ref_test, term_test, typedef_test, inline_sequence_test, - term_sequence_test, term_struct_test, wstring1_test]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> +[void_test, long_test, longlong_test, ushort_test, + ulong_test, ulonglong_test, double_test, char_test, + wchar_test, octet_test, bool_test, struct_test, + struct2_test, seq1_test, seq2_test, seq3_test, + seq4_test, seq5_test, array1_test, array2_test, + enum_test, string1_test, string2_test, string3_test, + string4_test, pid_test, port_test, ref_test, term_test, + typedef_test, inline_sequence_test, term_sequence_test, + term_struct_test, wstring1_test]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + array1_test(doc) -> ""; diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE.erl b/lib/ic/test/erl_client_c_server_proto_SUITE.erl index d75feb621a..c8ad4042e4 100644 --- a/lib/ic/test/erl_client_c_server_proto_SUITE.erl +++ b/lib/ic/test/erl_client_c_server_proto_SUITE.erl @@ -1,7 +1,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 @@ -24,9 +24,9 @@ -module(erl_client_c_server_proto_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). --export([init_per_testcase/2, fin_per_testcase/2, all/1, void_test/1, +-export([init_per_testcase/2, end_per_testcase/2,all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, void_test/1, long_test/1, longlong_test/1, ushort_test/1, ulong_test/1, ulonglong_test/1, double_test/1, char_test/1, wchar_test/1, octet_test/1, bool_test/1, struct_test/1, struct2_test/1, @@ -57,24 +57,40 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(?DEFAULT_TIMEOUT), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), test_server:timetrap_cancel(WatchDog). -all(doc) -> - "Test of IC with an Erlang client and a C server. " - "The communication is via Erlang distribution."; -all(suite) -> - [void_test, long_test, longlong_test, ushort_test, - ulong_test, ulonglong_test, double_test, - char_test, wchar_test, octet_test, bool_test, struct_test, - struct2_test, seq1_test, seq2_test, seq3_test, seq4_test, - seq5_test, array1_test, array2_test, enum_test, string1_test, - string2_test, string3_test, string4_test, pid_test, port_test, - ref_test, term_test, typedef_test, inline_sequence_test, - term_sequence_test, term_struct_test, wstring1_test]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> +[void_test, long_test, longlong_test, ushort_test, + ulong_test, ulonglong_test, double_test, char_test, + wchar_test, octet_test, bool_test, struct_test, + struct2_test, seq1_test, seq2_test, seq3_test, + seq4_test, seq5_test, array1_test, array2_test, + enum_test, string1_test, string2_test, string3_test, + string4_test, pid_test, port_test, ref_test, term_test, + typedef_test, inline_sequence_test, term_sequence_test, + term_struct_test, wstring1_test]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + array1_test(doc) -> ""; diff --git a/lib/ic/test/ic.cover b/lib/ic/test/ic.cover new file mode 100644 index 0000000000..5a679c8b6f --- /dev/null +++ b/lib/ic/test/ic.cover @@ -0,0 +1,2 @@ +{incl_app,ic,details}. + diff --git a/lib/ic/test/ic.spec b/lib/ic/test/ic.spec index 280c2aba47..22905dcee4 100644 --- a/lib/ic/test/ic.spec +++ b/lib/ic/test/ic.spec @@ -1 +1 @@ -{topcase, {dir, "../ic_test"}}. +{suites,"../ic_test",all}. diff --git a/lib/ic/test/ic_SUITE.erl b/lib/ic/test/ic_SUITE.erl index 6682c82f01..6a9d1325e1 100644 --- a/lib/ic/test/ic_SUITE.erl +++ b/lib/ic/test/ic_SUITE.erl @@ -22,9 +22,10 @@ %%%---------------------------------------------------------------------- -module(ic_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2]). -include_lib("orber/src/orber_ifr.hrl"). @@ -33,36 +34,36 @@ %% The type cases --export([type/1, type_norm/1]). +-export([ type_norm/1]). %% The syntax case --export([syntax/1]). +-export([]). -export([syntax1/1, syntax2/1, syntax3/1, syntax4/1, syntax5/1, syntax6/1]). %% The constant cases --export([const/1]). +-export([]). -export([const_norm/1, const_bad_tk/1, const_bad_type/1]). -export([const_bad_comb/1]). %% The union cases --export([union/1]). +-export([]). -export([union_norm/1, union_type/1, union_mult_err/1, union_case_mult/1]). -export([union_default/1]). %% The enum cases --export([enum/1]). +-export([]). -export([enum_norm/1]). %% The struct cases --export([struct/1]). +-export([]). -export([struct_norm/1]). %% The oneway cases --export([oneway/1]). +-export([]). -export([oneway_norm/1, oneway_raises/1, oneway_out/1, oneway_void/1, oneway_followed/1]). %% The attributes cases --export([attr/1]). +-export([]). -export([attr_norm/1]). %% The raises registration case @@ -72,12 +73,12 @@ %% The typeID case %% general stuff --export([general/1]). +-export([]). -export([typeid/1, undef_id/1, dir/1, nasty_names/1, coss/1, mult_ids/1]). -export([forward/1, include/1, app_test/1]). %% inheritance stuff --export([inherit/1, inherit_norm/1, inherit_warn/1, inherit_err/1]). +-export([ inherit_norm/1, inherit_warn/1, inherit_err/1]). %% Standard options to the ic compiler, NOTE unholy use of OutDir @@ -86,10 +87,46 @@ %% Top of cases -all(doc) -> - []; -all(suite) -> [app_test, const, union, enum, attr, type, struct, general, inherit, - oneway, syntax, raises_reg]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [app_test, {group, const}, {group, union}, + {group, enum}, {group, attr}, {group, type}, + {group, struct}, {group, general}, {group, inherit}, + {group, oneway}, {group, syntax}, raises_reg]. + +groups() -> + [{const, [], + [const_norm, const_bad_tk, const_bad_type, + const_bad_comb]}, + {union, [], + [union_norm, union_type, union_mult_err, + union_case_mult, union_default]}, + {enum, [], [enum_norm]}, {struct, [], [struct_norm]}, + {general, [], + [typeid, undef_id, mult_ids, forward, include, + nasty_names]}, + {inherit, [], + [inherit_norm, inherit_warn, inherit_err]}, + {oneway, [], + [oneway_norm, oneway_out, oneway_raises, oneway_void, + oneway_followed]}, + {attr, [], [attr_norm]}, {type, [], [type_norm]}, + {syntax, [], + [syntax1, syntax2, syntax3, syntax4, syntax5, syntax6]}]. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + app_test(doc) -> []; @@ -103,7 +140,6 @@ app_test(_Config) -> %% Test of constant expressions. %% -const(suite) -> [const_norm, const_bad_tk, const_bad_type, const_bad_comb]. const_norm(doc) -> @@ -159,10 +195,6 @@ const_bad_comb(Config) when is_list(Config) -> -union(suite) -> [union_norm, union_type, union_mult_err, union_case_mult, - union_default]; -union(doc) -> - ["Checks allowed usage of the union as well as the illegal cases"]. union_norm(doc) -> @@ -277,9 +309,6 @@ union_case_mult(Config) when is_list(Config) -> %% Enum cases %% -enum(suite) -> [enum_norm]; -enum(doc) -> - ["Checks allowed usage of the enum as well as the illegal cases"]. enum_norm(doc) -> ["Checks that normal enum declarations works."]; @@ -300,9 +329,6 @@ enum_norm(Config) when is_list(Config) -> %% Struct cases %% -struct(suite) -> [struct_norm]; -struct(doc) -> - ["Checks allowed usage of the struct as well as the illegal cases"]. struct_norm(doc) -> ["Checks that normal struct declarations works."]; @@ -331,10 +357,6 @@ struct_norm(Config) when is_list(Config) -> %% General cases %% -general(doc) -> - ["Check general things like directories and type identifier", - "detection."]; -general(suite) -> [typeid, undef_id, mult_ids, forward, include, nasty_names]. %% coss (add sometimes, takes 440 seconds!) typeid(doc) -> @@ -490,9 +512,6 @@ include(Config) when is_list(Config) -> %% Inhertit cases %% -inherit(doc) -> - ["Check the inheritance mechanism."]; -inherit(suite) -> [inherit_norm, inherit_warn, inherit_err]. inherit_norm(doc) -> ["Checks that normal inheritance works."]; @@ -547,9 +566,6 @@ inherit_err(Config) when is_list(Config) -> ok. -oneway(doc) -> - ["Check the oneway operation mechanism."]; -oneway(suite) -> [oneway_norm, oneway_out, oneway_raises, oneway_void, oneway_followed ]. oneway_norm(doc) -> ["Checks that normal oneway operations works."]; @@ -618,9 +634,6 @@ oneway_followed(Config) when is_list(Config) -> ?line ok = compile(OutDir, oneway_followed_files(), [load]), ok. -attr(doc) -> - ["Check that attributes work."]; -attr(suite) -> [attr_norm]. attr_norm(doc) -> ["Checks that normal attr operations works."]; @@ -636,9 +649,6 @@ attr_norm(Config) when is_list(Config) -> ?line ok = compile(OutDir, attr_norm_files(), [load]), ok. -type(doc) -> - ["Check that typeibutes work."]; -type(suite) -> [type_norm]. type_norm(doc) -> ["Checks all types are handled."]; @@ -655,9 +665,6 @@ type_norm(Config) when is_list(Config) -> ok. -syntax(doc) -> - ["Check that syntax errors are discovered."]; -syntax(suite) -> [syntax1, syntax2, syntax3, syntax4, syntax5, syntax6]. syntax1(suite) -> []; syntax1(Config) when is_list(Config) -> diff --git a/lib/ic/test/ic_be_SUITE.erl b/lib/ic/test/ic_be_SUITE.erl index e3caf7bdff..3693d22cd2 100644 --- a/lib/ic/test/ic_be_SUITE.erl +++ b/lib/ic/test/ic_be_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -22,10 +22,11 @@ %%%---------------------------------------------------------------------- -module(ic_be_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1,plain/1]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2,plain/1]). -define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])). @@ -33,7 +34,26 @@ %% Top of cases -all(suite) -> [plain]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [plain]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + diff --git a/lib/ic/test/ic_pp_SUITE.erl b/lib/ic/test/ic_pp_SUITE.erl index d68242bf3a..27d404239f 100644 --- a/lib/ic/test/ic_pp_SUITE.erl +++ b/lib/ic/test/ic_pp_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -22,7 +22,7 @@ %%---------------------------------------------------------------------- -module(ic_pp_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). @@ -32,50 +32,57 @@ -define(GCC, "g++"). -define(GCC_VER, "2.95.3"). --export([all/1]). --export([arg/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]). -export([arg_norm/1]). --export([cascade/1]). -export([cascade_norm/1]). --export([comment/1]). -export([comment_norm/1]). --export([concat/1]). -export([concat_norm/1]). --export([define/1]). -export([define_norm/1]). --export(['if'/1]). -export([if_norm/1]). -export([if_zero/1]). --export([misc/1]). -export([misc_norm/1]). --export([improp_nest_constr/1]). -export([improp_nest_constr_norm/1]). --export([inc/1]). -export([inc_norm/1]). --export([line/1]). -export([line_norm/1]). --export([nopara/1]). -export([nopara_norm/1]). --export([predef/1]). -export([predef_norm/1]). --export([predef_time/1]). -export([predef_time_norm/1]). --export([self_ref/1]). -export([self_ref_norm/1]). --export([separate/1]). -export([separate_norm/1]). --export([swallow_sc/1]). -export([swallow_sc_norm/1]). --export([unintended_grp/1]). -export([unintended_grp_norm/1]). --export([cases/0, init_all/1, finish_all/1]). +-export([cases/0, init_per_suite/1, end_per_suite/1]). -all(doc) -> ["Preprocessing tests for IC"]; -all(suite) -> - {req, [], {conf, init_all, cases(), finish_all}}. +suite() -> [{ct_hooks,[ts_install_cth]}]. -init_all(Config) -> +all() -> + cases(). + +groups() -> + [{arg, [], [arg_norm]}, {cascade, [], [cascade_norm]}, + {comment, [], [comment_norm]}, + {concat, [], [concat_norm]}, + {define, [], [define_norm]}, {inc, [], [inc_norm]}, + {improp_nest_constr, [], [improp_nest_constr_norm]}, + {misc, [], [misc_norm]}, {line, [], [line_norm]}, + {nopara, [], [nopara_norm]}, + {predef, [], [predef_norm]}, + {predef_time, [], [predef_time_norm]}, + {self_ref, [], [self_ref_norm]}, + {separate, [], [separate_norm]}, + {swallow_sc, [], [swallow_sc_norm]}, + {unintended_grp, [], [unintended_grp_norm]}, + {'if', [],[if_norm, if_zero]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +init_per_suite(Config) -> if is_list(Config) -> case os:type() of @@ -120,14 +127,18 @@ skip_white([$\t|T]) -> skip_white(T); skip_white(L) -> L. -finish_all(Config) -> +end_per_suite(Config) -> Config. -cases() -> - [arg, cascade, comment, concat, define, misc, 'if', improp_nest_constr, inc, - line, nopara, predef, predef_time, self_ref, separate, swallow_sc, - unintended_grp]. +cases() -> + [{group, arg}, {group, cascade}, {group, comment}, + {group, concat}, {group, define}, {group, misc}, {group, 'if'}, + {group, improp_nest_constr}, {group, inc}, + {group, line}, {group, nopara}, {group, predef}, + {group, predef_time}, {group, self_ref}, + {group, separate}, {group, swallow_sc}, + {group, unintended_grp}]. @@ -135,8 +146,6 @@ cases() -> %% arg %%-------------------------------------------------------------------- -arg(suite) -> [arg_norm]; -arg(doc) -> ["Check #define with some arguments"]. arg_norm(doc) -> ["Checks arguments for #define."]; arg_norm(suite) -> []; @@ -153,8 +162,6 @@ arg_norm(Config) when is_list(Config) -> %% cascade %%-------------------------------------------------------------------- -cascade(suite) -> [cascade_norm]; -cascade(doc) -> ["Check cascade #define"]. cascade_norm(doc) -> ["Check cascade #define."]; cascade_norm(suite) -> []; @@ -171,8 +178,6 @@ cascade_norm(Config) when is_list(Config) -> %% comment %%-------------------------------------------------------------------- -comment(suite) -> [comment_norm]; -comment(doc) -> ["Check comments"]. comment_norm(doc) -> ["Check comments."]; comment_norm(suite) -> []; @@ -189,8 +194,6 @@ comment_norm(Config) when is_list(Config) -> %% concat %%-------------------------------------------------------------------- -concat(suite) -> [concat_norm]; -concat(doc) -> ["Check concatinations, i.e ## "]. concat_norm(doc) -> ["Check concatinations, i.e ## ."]; concat_norm(suite) -> []; @@ -207,8 +210,6 @@ concat_norm(Config) when is_list(Config) -> %% define %%-------------------------------------------------------------------- -define(suite) -> [define_norm]; -define(doc) -> ["Check misceleaneous #define"]. define_norm(doc) -> ["Check misceleaneous #define."]; define_norm(suite) -> []; @@ -225,10 +226,6 @@ define_norm(Config) when is_list(Config) -> %% if %%-------------------------------------------------------------------- -'if'(suite) -> [if_norm, if_zero]; -'if'(doc) -> ["Check #if, #elif, and #endif. Note these are not implementen and will ~n - result in an error message from internal_pp"]. - if_norm(doc) -> ["Check #if, #elif, and #endif. ."]; if_norm(suite) -> []; if_norm(Config) when is_list(Config) -> @@ -254,8 +251,6 @@ if_zero(Config) when is_list(Config) -> %% inc %%-------------------------------------------------------------------- -inc(suite) -> [inc_norm]; -inc(doc) -> ["Check #include"]. inc_norm(doc) -> ["Check #include."]; inc_norm(suite) -> []; @@ -273,8 +268,6 @@ inc_norm(Config) when is_list(Config) -> %% improp_nest_constr %%-------------------------------------------------------------------- -improp_nest_constr(suite) -> [improp_nest_constr_norm]; -improp_nest_constr(doc) -> ["Check improperly nested constructs"]. improp_nest_constr_norm(doc) -> ["Check improperly nested constructs."]; improp_nest_constr_norm(suite) -> []; @@ -291,8 +284,6 @@ improp_nest_constr_norm(Config) when is_list(Config) -> %% misc %%-------------------------------------------------------------------- -misc(suite) -> [misc_norm]; -misc(doc) -> ["Misceleaneous checks"]. misc_norm(doc) -> ["Misceleaneous checks."]; misc_norm(suite) -> []; @@ -309,8 +300,6 @@ misc_norm(Config) when is_list(Config) -> %% line %%-------------------------------------------------------------------- -line(suite) -> [line_norm]; -line(doc) -> ["Checks #line"]. line_norm(doc) -> ["Checks #line."]; line_norm(suite) -> []; @@ -327,8 +316,6 @@ line_norm(Config) when is_list(Config) -> %% nopara %%-------------------------------------------------------------------- -nopara(suite) -> [nopara_norm]; -nopara(doc) -> ["Checks #define with no parameters"]. nopara_norm(doc) -> ["Checks #define with no parameters."]; nopara_norm(suite) -> []; @@ -345,8 +332,6 @@ nopara_norm(Config) when is_list(Config) -> %% predef %%-------------------------------------------------------------------- -predef(suite) -> [predef_norm]; -predef(doc) -> ["Checks predefined macros. Note: not __TIME__ and __DATE__"]. predef_norm(doc) -> ["Checks predefined macros. Note: not __TIME__ and __DATE__."]; predef_norm(suite) -> []; @@ -363,8 +348,6 @@ predef_norm(Config) when is_list(Config) -> %% predef_time %%-------------------------------------------------------------------- -predef_time(suite) -> [predef_time_norm]; -predef_time(doc) -> ["Checks the predefined macros __TIME__ and __DATE__"]. predef_time_norm(doc) -> ["Checks the predefined macros __TIME__ and __DATE__."]; predef_time_norm(suite) -> []; @@ -381,8 +364,6 @@ predef_time_norm(Config) when is_list(Config) -> %% self_ref %%-------------------------------------------------------------------- -self_ref(suite) -> [self_ref_norm]; -self_ref(doc) -> ["Checks self referring macros"]. self_ref_norm(doc) -> ["Checks self referring macros."]; self_ref_norm(suite) -> []; @@ -399,8 +380,6 @@ self_ref_norm(Config) when is_list(Config) -> %% separate %%-------------------------------------------------------------------- -separate(suite) -> [separate_norm]; -separate(doc) -> ["Checks separete expansion of macro arguments"]. separate_norm(doc) -> ["Checks separete expansion of macro arguments."]; separate_norm(suite) -> []; @@ -417,8 +396,6 @@ separate_norm(Config) when is_list(Config) -> %% swallow_sc %%-------------------------------------------------------------------- -swallow_sc(suite) -> [swallow_sc_norm]; -swallow_sc(doc) -> ["Checks swallowing an undesirable semicolon"]. swallow_sc_norm(doc) -> ["Checks swallowing an undesirable semicolon."]; swallow_sc_norm(suite) -> []; @@ -435,8 +412,6 @@ swallow_sc_norm(Config) when is_list(Config) -> %% unintended_grp %%-------------------------------------------------------------------- -unintended_grp(suite) -> [unintended_grp_norm]; -unintended_grp(doc) -> ["Checks unintended grouping of arithmetic"]. unintended_grp_norm(doc) -> ["Checks unintended grouping of arithmetic."]; unintended_grp_norm(suite) -> []; diff --git a/lib/ic/test/ic_pragma_SUITE.erl b/lib/ic/test/ic_pragma_SUITE.erl index 0edb5d4717..65fda2e3b9 100644 --- a/lib/ic/test/ic_pragma_SUITE.erl +++ b/lib/ic/test/ic_pragma_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -27,12 +27,13 @@ %%----------------------------------------------------------------- -module(ic_pragma_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("orber/include/corba.hrl"). %%----------------------------------------------------------------- %% External exports %%----------------------------------------------------------------- --export([all/1, init_all/1, finish_all/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, + init_per_suite/1, end_per_suite/1]). -export([ifr_pragma_reg/1, pragma_error/1, uggly_pragmas/1]). @@ -53,18 +54,28 @@ %% Args: %% Returns: %%----------------------------------------------------------------- -all(doc) -> ["Description", "more description"]; -all(suite) -> {req, - [mnesia], - {conf, init_all, cases(), finish_all}}. +suite() -> [{ct_hooks,[ts_install_cth]}]. -cases() -> - [ifr_pragma_reg,pragma_error,uggly_pragmas]. +all() -> + cases(). + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> + [ifr_pragma_reg, pragma_error, uggly_pragmas]. %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- -init_all(Config) -> +init_per_suite(Config) -> io:format("Setting up.....~n"), mnesia:stop(), mnesia:delete_schema([node()]), @@ -79,7 +90,7 @@ init_all(Config) -> exit("Config not a list") end. -finish_all(Config) -> +end_per_suite(Config) -> io:format("Setting down.....~n"), orber:stop(), orber:uninstall(), diff --git a/lib/ic/test/ic_register_SUITE.erl b/lib/ic/test/ic_register_SUITE.erl index ae7578199a..6a9dea5a3d 100644 --- a/lib/ic/test/ic_register_SUITE.erl +++ b/lib/ic/test/ic_register_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. +%% Copyright Ericsson AB 1998-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 @@ -26,12 +26,13 @@ %%----------------------------------------------------------------- -module(ic_register_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("orber/include/corba.hrl"). %%----------------------------------------------------------------- %% External exports %%----------------------------------------------------------------- --export([all/1, init_all/1, finish_all/1, ifr_reg_unreg/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, + init_per_suite/1, end_per_suite/1, ifr_reg_unreg/1]). -export([ifr_inheritence_reg/1,ifr_reg_unreg_with_inheritence/1]). -export([ifr_reg_unreg_with_inheritence_bad_order/1]). @@ -57,20 +58,31 @@ %% Args: %% Returns: %%----------------------------------------------------------------- -all(doc) -> ["Description", "more description"]; -all(suite) -> {req, - [mnesia], - {conf, init_all, cases(), finish_all}}. +suite() -> [{ct_hooks,[ts_install_cth]}]. -cases() -> - [ifr_reg_unreg,ifr_reg_unreg_with_inheritence, - ifr_reg_unreg_with_inheritence_bad_order,ifr_inheritence_reg]. +all() -> + cases(). + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> + [ifr_reg_unreg, ifr_reg_unreg_with_inheritence, + ifr_reg_unreg_with_inheritence_bad_order, + ifr_inheritence_reg]. %%----------------------------------------------------------------- %% Init and cleanup functions. %%----------------------------------------------------------------- -init_all(Config) -> +init_per_suite(Config) -> io:format("Setting up.....~n"), mnesia:stop(), mnesia:delete_schema([node()]), @@ -85,7 +97,7 @@ init_all(Config) -> exit("Config not a list") end. -finish_all(Config) -> +end_per_suite(Config) -> io:format("Setting down.....~n"), orber:stop(), orber:uninstall(), diff --git a/lib/ic/test/java_client_erl_server_SUITE.erl b/lib/ic/test/java_client_erl_server_SUITE.erl index ee77ef0c4e..bd87ce24d9 100644 --- a/lib/ic/test/java_client_erl_server_SUITE.erl +++ b/lib/ic/test/java_client_erl_server_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2009. All Rights Reserved. +%% Copyright Ericsson AB 2003-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 @@ -22,10 +22,12 @@ %%%---------------------------------------------------------------------- -module(java_client_erl_server_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1,init_all/1,finish_all/1,init_per_testcase/2,fin_per_testcase/2]). +-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]). -export([marshal_ll/1,marshal_ull/1, marshal_l/1,marshal_ul/1, marshal_s/1,marshal_us/1, @@ -36,19 +38,27 @@ %% Top of cases -all(doc) -> - "Test of IC with a Java-client and an Erlang generic server. " - "The communication is via Erlang distribution."; -all(suite) -> {conf,init_all,cases(),finish_all}. +suite() -> [{ct_hooks,[ts_install_cth]}]. -cases() -> [marshal_ll,marshal_ull, - marshal_l,marshal_ul, - marshal_s,marshal_us, - marshal_c,marshal_wc, - marshal_str, - marshal_any_3,marshal_any_2]. +all() -> + cases(). -init_all(Config) when is_list(Config) -> +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> + [marshal_ll, marshal_ull, marshal_l, marshal_ul, + marshal_s, marshal_us, marshal_c, marshal_wc, + marshal_str, marshal_any_3, marshal_any_2]. + +init_per_suite(Config) when is_list(Config) -> case case code:priv_dir(jinterface) of {error,bad_name} -> false; @@ -76,7 +86,7 @@ find_executable([E|T]) -> Path -> Path end. -finish_all(Config) -> Config. +end_per_suite(Config) -> Config. @@ -98,7 +108,7 @@ init_per_testcase(_Case, Config) -> WatchDog = test_server:timetrap(test_server:seconds(20)), [{watchdog, WatchDog}| Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> DataDir = ?config(data_dir, Config), code:del_path(DataDir), WatchDog = ?config(watchdog, Config), diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk index 074d0b3d39..6d6c7fa625 100644 --- a/lib/ic/vsn.mk +++ b/lib/ic/vsn.mk @@ -1 +1 @@ -IC_VSN = 4.2.25 +IC_VSN = 4.2.26 |