diff options
Diffstat (limited to 'lib/asn1')
146 files changed, 512 insertions, 464 deletions
diff --git a/lib/asn1/Makefile b/lib/asn1/Makefile index 1db7532024..26e7e37924 100644 --- a/lib/asn1/Makefile +++ b/lib/asn1/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2009. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile index 2b72e1a214..1f714df357 100644 --- a/lib/asn1/c_src/Makefile +++ b/lib/asn1/c_src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2002-2012. All Rights Reserved. +# Copyright Ericsson AB 2002-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -97,12 +97,7 @@ endif _create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR)) -ifneq ($(findstring ose,$(TARGET)),ose) opt: $(NIF_SHARED_OBJ_FILE) -else -# Do not build dynamic files on OSE -opt: -endif debug: opt @@ -140,9 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib" -ifneq ($(findstring ose,$(TARGET)),ose) $(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib" -endif $(INSTALL_DIR) "$(RELSYSDIR)/c_src" $(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src" diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c index 828b55eec6..4577689fc3 100644 --- a/lib/asn1/c_src/asn1_erl_nif.c +++ b/lib/asn1/c_src/asn1_erl_nif.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2002-2013. All Rights Reserved. + * Copyright Ericsson AB 2002-2016. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/asn1/doc/src/Makefile b/lib/asn1/doc/src/Makefile index 463e9231dc..559836116f 100644 --- a/lib/asn1/doc/src/Makefile +++ b/lib/asn1/doc/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2012. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/asn1/doc/src/asn1_getting_started.xml b/lib/asn1/doc/src/asn1_getting_started.xml index ca7dc3a3cc..d40b294c39 100644 --- a/lib/asn1/doc/src/asn1_getting_started.xml +++ b/lib/asn1/doc/src/asn1_getting_started.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -678,7 +678,7 @@ ok 1081,32,1043,1085,1086,1084]</pre> <p>For details, see the <seealso marker="stdlib:unicode">unicode</seealso> - module in <c>stdlib</c>.</p> + module in STDLIB.</p> <p>In the following example, this ASN.1 specification is used:</p> <pre> diff --git a/lib/asn1/doc/src/asn1_introduction.xml b/lib/asn1/doc/src/asn1_introduction.xml index 3c69eb82ab..e4f406364d 100644 --- a/lib/asn1/doc/src/asn1_introduction.xml +++ b/lib/asn1/doc/src/asn1_introduction.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -30,7 +30,7 @@ <file>asn1_introduction.xml</file> </header> - <p>The <c>ASN.1</c> application provides the following:</p> + <p>The ASN.1 application provides the following:</p> <list type="bulleted"> <item>An ASN.1 compiler for Erlang, which generates encode and diff --git a/lib/asn1/doc/src/asn1_overview.xml b/lib/asn1/doc/src/asn1_overview.xml index 3929db7a54..b04401b2dc 100644 --- a/lib/asn1/doc/src/asn1_overview.xml +++ b/lib/asn1/doc/src/asn1_overview.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/asn1_spec.xmlsrc b/lib/asn1/doc/src/asn1_spec.xmlsrc index 5409ba0aa1..6367376f50 100644 --- a/lib/asn1/doc/src/asn1_spec.xmlsrc +++ b/lib/asn1/doc/src/asn1_spec.xmlsrc @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2003</year><year>2013</year> + <year>2003</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml index e056a89432..e5a7b1bcc4 100644 --- a/lib/asn1/doc/src/asn1ct.xml +++ b/lib/asn1/doc/src/asn1ct.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/asn1rt.xml b/lib/asn1/doc/src/asn1rt.xml index 65556f3f87..3f53ca0f56 100644 --- a/lib/asn1/doc/src/asn1rt.xml +++ b/lib/asn1/doc/src/asn1rt.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/book.xml b/lib/asn1/doc/src/book.xml index 0947938429..2073405f54 100644 --- a/lib/asn1/doc/src/book.xml +++ b/lib/asn1/doc/src/book.xml @@ -5,7 +5,7 @@ <book xmlns:xi="http://www.w3.org/2001/XInclude"> <header titlestyle="normal"> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml index 78d856b0be..499a7e40c3 100644 --- a/lib/asn1/doc/src/notes.xml +++ b/lib/asn1/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2013</year> + <year>2004</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -32,6 +32,37 @@ <p>This document describes the changes made to the asn1 application.</p> +<section><title>Asn1 4.0.4</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Compiling multiple ASN.1 modules in the same directory + with parallel make (make -j) should now be safe.</p> + <p> + Own Id: OTP-13624</p> + </item> + </list> + </section> + +</section> + +<section><title>Asn1 4.0.3</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Internal changes</p> + <p> + Own Id: OTP-13551</p> + </item> + </list> + </section> + +</section> + <section><title>Asn1 4.0.2</title> <section><title>Fixed Bugs and Malfunctions</title> @@ -314,7 +345,7 @@ </item> <item> <p> - The <c>asn1</c> application would fail to build if the + The ASN.1 application would fail to build if the <c>.erlang</c> file printed something to standard output.</p> <p> Own Id: OTP-11360</p> @@ -982,7 +1013,7 @@ also been extended. </item><item> The <c>configure</c> scripts of <c>erl_interface</c> and <c>odbc</c> now search for thread libraries and thread library quirks the - same way as <c>erts</c> do. </item><item> The + same way as ERTS do. </item><item> The <c>configure</c> script of the <c>odbc</c> application now also looks for odbc libraries in <c>lib64</c> and <c>lib/64</c> directories when building on a 64-bit diff --git a/lib/asn1/doc/src/part.xml b/lib/asn1/doc/src/part.xml index 9423dc5b9e..5a1b8e1a40 100644 --- a/lib/asn1/doc/src/part.xml +++ b/lib/asn1/doc/src/part.xml @@ -4,7 +4,7 @@ <part xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/src/ref_man.xml b/lib/asn1/doc/src/ref_man.xml index 01f42f54db..d70e2bc05f 100644 --- a/lib/asn1/doc/src/ref_man.xml +++ b/lib/asn1/doc/src/ref_man.xml @@ -4,7 +4,7 @@ <application xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>1997</year><year>2013</year> + <year>1997</year><year>2016</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/asn1/doc/users_guide/Makefile b/lib/asn1/doc/users_guide/Makefile index ae3a55b945..38196f5e1c 100644 --- a/lib/asn1/doc/users_guide/Makefile +++ b/lib/asn1/doc/users_guide/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2009. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile index 5b34017e9b..38cf2d496a 100644 --- a/lib/asn1/src/Makefile +++ b/lib/asn1/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2013. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1.appup.src b/lib/asn1/src/asn1.appup.src index 66907055b9..9487d6207d 100644 --- a/lib/asn1/src/asn1.appup.src +++ b/lib/asn1/src/asn1.appup.src @@ -1,7 +1,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1_db.erl b/lib/asn1/src/asn1_db.erl index 32052885d3..869ea310aa 100644 --- a/lib/asn1/src/asn1_db.erl +++ b/lib/asn1/src/asn1_db.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -106,7 +106,9 @@ loop(#state{parent = Parent, monitor = MRef, table = Table, loop(State); {save, OutFile, Mod} -> [{_,Mtab}] = ets:lookup(Table, Mod), - ok = ets:tab2file(Mtab, OutFile), + TempFile = OutFile ++ ".#temp", + ok = ets:tab2file(Mtab, TempFile), + ok = file:rename(TempFile, OutFile), loop(State); {From, {new, Mod, Erule}} -> [] = ets:lookup(Table, Mod), %Assertion. diff --git a/lib/asn1/src/asn1_records.hrl b/lib/asn1/src/asn1_records.hrl index 1ffc6c2980..af10c1771c 100644 --- a/lib/asn1/src/asn1_records.hrl +++ b/lib/asn1/src/asn1_records.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl index d0ab947f32..8783b5418d 100644 --- a/lib/asn1/src/asn1ct.erl +++ b/lib/asn1/src/asn1ct.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -221,9 +221,8 @@ check_pass(#st{code=M,file=File,includes=Includes, {error,St#st{error=Reason}} end. -save_pass(#st{code=M,erule=Erule,dbfile=DbFile}=St) -> +save_pass(#st{code=M,erule=Erule}=St) -> ok = asn1ct_check:storeindb(#state{erule=Erule}, M), - asn1_db:dbsave(DbFile,M#module.name), {ok,St}. parse_listing(#st{code=Code,outfile=OutFile0}=St) -> diff --git a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl index b31f616677..325bea5879 100644 --- a/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl +++ b/lib/asn1/src/asn1ct_constructed_ber_bin_v2.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2014. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -500,9 +500,7 @@ gen_decode_sof(Erules,TypeName,_InnerTypeName,D) when is_record(D,type) -> Atom when is_atom(Atom) -> Atom; _ -> TypeNameSuffix end, - ObjFun = false, - gen_dec_line(Erules,TypeName,ContName,[],Cont,mandatory,ObjFun), - %% gen_dec_line_sof(Erules,Typename,ContName,Cont,ObjFun), + gen_dec_line(Erules,TypeName,ContName,[],Cont,mandatory), emit([" || ",{curr,v}," <- ",{curr,tlv},"].",nl,nl,nl]). @@ -869,7 +867,7 @@ gen_dec_choice_cases(Erules,TopType, [H|T]) -> (?ASN1CT_GEN_BER:decode_class(T1class) bsl 10) + T1number,",_} -> ",nl]), emit([indent(8),"{",{asis,Cname},", "]), - gen_dec_line(Erules,TopType,Cname,[],Type,Prop,false), + gen_dec_line(Erules,TopType,Cname,[],Type,Prop), emit(["};",nl,nl]), Fun(Tail,Fun); ([],_) -> @@ -896,7 +894,7 @@ gen_dec_choice_cases(Erules,TopType, [H|T]) -> (?ASN1CT_GEN_BER:decode_class(FirstT#tag.class) bsl 10) + FirstT#tag.number,", ",{curr,v},"} -> ",nl]), emit([indent(8),"{",{asis,Cname},", "]), - gen_dec_line(Erules,TopType,Cname,[],Type#type{tag=RestT},Prop,false), + gen_dec_line(Erules,TopType,Cname,[],Type#type{tag=RestT},Prop), emit(["};",nl,nl]) end, gen_dec_choice_cases(Erules,TopType, T). @@ -1060,8 +1058,14 @@ gen_optormand_case({'DEFAULT',DefaultValue}, Erules, _TopType, end, emit([indent(9),"_ ->",nl,indent(12)]) end. - +%% Use for SEQUENCE OF and CHOICE. +gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand) -> + %% The matching on the next line is an assertion. + {[],[]} = gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand,false), + ok. + +%% Use for SEQUENCE. gen_dec_line(Erules,TopType,Cname,CTags,Type,OptOrMand,DecObjInf) -> BytesVar = asn1ct_gen:mk_var(asn1ct_name:curr(v)), Tag = diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl index 42f9bb836e..a34b25182c 100644 --- a/lib/asn1/src/asn1ct_constructed_per.erl +++ b/lib/asn1/src/asn1ct_constructed_per.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_func.erl b/lib/asn1/src/asn1ct_func.erl index ad1494f7af..0cd72acf9d 100644 --- a/lib/asn1/src/asn1ct_func.erl +++ b/lib/asn1/src/asn1ct_func.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl index 6d5062a118..bfaffa13bf 100644 --- a/lib/asn1/src/asn1ct_gen.erl +++ b/lib/asn1/src/asn1ct_gen.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl index 311307cf78..b884d14b0d 100644 --- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl +++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2014. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_gen_check.erl b/lib/asn1/src/asn1ct_gen_check.erl index 385c67d628..abe77dd0cb 100644 --- a/lib/asn1/src/asn1ct_gen_check.erl +++ b/lib/asn1/src/asn1ct_gen_check.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl index ff5b19b542..aa7223904e 100644 --- a/lib/asn1/src/asn1ct_gen_per.erl +++ b/lib/asn1/src/asn1ct_gen_per.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index e09256cde9..8b96242c56 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2015. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_name.erl b/lib/asn1/src/asn1ct_name.erl index 577c15c7c0..72d541cbbc 100644 --- a/lib/asn1/src/asn1ct_name.erl +++ b/lib/asn1/src/asn1ct_name.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl index 120ca67226..2de9b0e2f0 100644 --- a/lib/asn1/src/asn1ct_parser2.erl +++ b/lib/asn1/src/asn1ct_parser2.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2013. All Rights Reserved. +%% Copyright Ericsson AB 2000-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_pretty_format.erl b/lib/asn1/src/asn1ct_pretty_format.erl index 7e28543a05..f4669f7eb0 100644 --- a/lib/asn1/src/asn1ct_pretty_format.erl +++ b/lib/asn1/src/asn1ct_pretty_format.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2009. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_table.erl b/lib/asn1/src/asn1ct_table.erl index b1eaf2b332..1a3a81d329 100644 --- a/lib/asn1/src/asn1ct_table.erl +++ b/lib/asn1/src/asn1ct_table.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_tok.erl b/lib/asn1/src/asn1ct_tok.erl index 5aeb8c171e..8235b689f8 100644 --- a/lib/asn1/src/asn1ct_tok.erl +++ b/lib/asn1/src/asn1ct_tok.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl index 7f20d57b1e..57cd3f8af6 100644 --- a/lib/asn1/src/asn1ct_value.erl +++ b/lib/asn1/src/asn1ct_value.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -353,10 +353,7 @@ random_unnamed_bit_string(M, C) -> %% end. random(Upper) -> - _ = random:seed(erlang:phash2([erlang:node()]), - erlang:monotonic_time(), - erlang:unique_integer()), - random:uniform(Upper). + rand:uniform(Upper). size_random(C) -> case get_constraint(C,'SizeConstraint') of diff --git a/lib/asn1/src/asn1rt.erl b/lib/asn1/src/asn1rt.erl index 2c38c27dd8..3e09ce2252 100644 --- a/lib/asn1/src/asn1rt.erl +++ b/lib/asn1/src/asn1rt.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2011. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rt_nif.erl b/lib/asn1/src/asn1rt_nif.erl index 6ee182ed23..ff464885f6 100644 --- a/lib/asn1/src/asn1rt_nif.erl +++ b/lib/asn1/src/asn1rt_nif.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2013. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_ber.erl b/lib/asn1/src/asn1rtt_ber.erl index e50b14941c..fdb9b9061f 100644 --- a/lib/asn1/src/asn1rtt_ber.erl +++ b/lib/asn1/src/asn1rtt_ber.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_check.erl b/lib/asn1/src/asn1rtt_check.erl index 4839fa98dc..e81842fd20 100644 --- a/lib/asn1/src/asn1rtt_check.erl +++ b/lib/asn1/src/asn1rtt_check.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_ext.erl b/lib/asn1/src/asn1rtt_ext.erl index fa55ae4d85..3bf01823db 100644 --- a/lib/asn1/src/asn1rtt_ext.erl +++ b/lib/asn1/src/asn1rtt_ext.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_per.erl b/lib/asn1/src/asn1rtt_per.erl index a3803659b6..753a38aa6e 100644 --- a/lib/asn1/src/asn1rtt_per.erl +++ b/lib/asn1/src/asn1rtt_per.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_per_common.erl b/lib/asn1/src/asn1rtt_per_common.erl index e85dc94f4c..3896cb7fa5 100644 --- a/lib/asn1/src/asn1rtt_per_common.erl +++ b/lib/asn1/src/asn1rtt_per_common.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_real_common.erl b/lib/asn1/src/asn1rtt_real_common.erl index 7b155e5c91..3a79209015 100644 --- a/lib/asn1/src/asn1rtt_real_common.erl +++ b/lib/asn1/src/asn1rtt_real_common.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/asn1rtt_uper.erl b/lib/asn1/src/asn1rtt_uper.erl index 7a52324252..0ab8fab141 100644 --- a/lib/asn1/src/asn1rtt_uper.erl +++ b/lib/asn1/src/asn1rtt_uper.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012-2013. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/src/prepare_templates.erl b/lib/asn1/src/prepare_templates.erl index 3e24366cdf..3f996a563f 100644 --- a/lib/asn1/src/prepare_templates.erl +++ b/lib/asn1/src/prepare_templates.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/External.hrl b/lib/asn1/test/External.hrl index dd4fa6de3a..6619e5c42f 100644 --- a/lib/asn1/test/External.hrl +++ b/lib/asn1/test/External.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2011. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/Makefile b/lib/asn1/test/Makefile index 9a34fa6271..0716d79291 100644 --- a/lib/asn1/test/Makefile +++ b/lib/asn1/test/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2013. All Rights Reserved. +# Copyright Ericsson AB 1997-2016. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl index 6dea1787a8..b6430134ab 100644 --- a/lib/asn1/test/asn1_SUITE.erl +++ b/lib/asn1/test/asn1_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -28,13 +28,15 @@ -compile(export_all). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). %%------------------------------------------------------------------------------ %% Suite definition %%------------------------------------------------------------------------------ -suite() -> [{ct_hooks, [ts_install_cth]}]. +suite() -> + [{ct_hooks, [ts_install_cth]}, + {timetrap,{minutes,60}}]. all() -> [{group, compile}, @@ -194,18 +196,15 @@ end_per_group(_GroupName, Config) -> Config. init_per_testcase(Func, Config) -> - CaseDir = filename:join(?config(priv_dir, Config), Func), + CaseDir = filename:join(proplists:get_value(priv_dir, Config), Func), ok = filelib:ensure_dir(filename:join([CaseDir, dummy_file])), true = code:add_patha(CaseDir), - - Dog = case Func of - testRfcs -> ct:timetrap({minutes, 90}); - _ -> ct:timetrap({minutes, 60}) - end, - [{case_dir, CaseDir}, {watchdog, Dog}|Config]. + [{case_dir, CaseDir}|Config]. end_per_testcase(_Func, Config) -> - code:del_path(?config(case_dir, Config)). + CaseDir = proplists:get_value(case_dir, Config), + asn1_test_lib:rm_dirs([CaseDir]), + code:del_path(CaseDir). %%------------------------------------------------------------------------------ %% Test runners @@ -243,7 +242,7 @@ opts(Rule) when is_atom(Rule) -> []; opts({_Rule, Opts}) -> Opts. run_case(Config, Fun, Rule, Opts) -> - CaseDir = ?config(case_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), Dir = filename:join([CaseDir, join(Rule, Opts)]), ok = filelib:ensure_dir(filename:join([Dir, dummy_file])), replace_path(CaseDir, Dir), @@ -465,7 +464,7 @@ testSeqExtension(Config, Rule, Opts) -> "SeqExtension2"], Config, [Rule|Opts]), - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), testSeqExtension:main(Rule, DataDir, [Rule|Opts]). testSeqOptional(Config) -> test(Config, fun testSeqOptional/3). @@ -585,8 +584,8 @@ constraint_equivalence(Config, Rule, Opts) -> asn1_test_lib:compile(M, Config, [Rule|Opts]). constraint_equivalence_abs(Config) -> - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), Asn1Spec = "ConstraintEquivalence", Asn1Src = filename:join(DataDir, Asn1Spec), ok = asn1ct:compile(Asn1Src, [abs,{outdir,CaseDir}]), @@ -637,7 +636,7 @@ module_test(M0, Config, Rule, Opts) -> %% value for 'Filter' is not guaranteed to terminate. ok; M -> - TestOpts = [{i, ?config(case_dir, Config)}], + TestOpts = [{i, proplists:get_value(case_dir, Config)}], case asn1ct:test(M, TestOpts) of ok -> ok; @@ -768,7 +767,7 @@ testInfObjectClass(Config, Rule, Opts) -> testUniqueObjectSets(Config) -> test(Config, fun testUniqueObjectSets/3). testUniqueObjectSets(Config, Rule, Opts) -> - CaseDir = ?config(case_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), testUniqueObjectSets:main(CaseDir, Rule, Opts). testInfObjExtract(Config) -> test(Config, fun testInfObjExtract/3). @@ -993,6 +992,9 @@ testS1AP(Config, Rule, Opts) -> ok end. +testRfcs() -> + [{timetrap,{minutes,90}}]. + testRfcs(Config) -> test(Config, fun testRfcs/3, [{ber,[der]}]). testRfcs(Config, Rule, Opts) -> case erlang:system_info(system_architecture) of @@ -1136,7 +1138,7 @@ test_modules() -> "CCSNARG3"]. test_OTP_9688(Config) -> - PrivDir = ?config(case_dir, Config), + PrivDir = proplists:get_value(case_dir, Config), Data = " OTP-9688 DEFINITIONS ::= BEGIN @@ -1172,12 +1174,10 @@ testTimer_uper(Config) -> testTimer:go(). %% Test of multiple-line comment, OTP-8043 -testComment(suite) -> []; testComment(Config) -> asn1_test_lib:compile("Comment", Config, []), asn1_test_lib:roundtrip('Comment', 'Seq', {'Seq',12,true}). -testName2Number(suite) -> []; testName2Number(Config) -> N2NOptions = [{n2n,Type} || Type <- ['CauseMisc', 'CauseProtocol', 'CauseRadioNetwork', diff --git a/lib/asn1/test/asn1_SUITE_data/Extension-Addition-Group.asn b/lib/asn1/test/asn1_SUITE_data/Extension-Addition-Group.asn index c0315c1489..71bb915662 100644 --- a/lib/asn1/test/asn1_SUITE_data/Extension-Addition-Group.asn +++ b/lib/asn1/test/asn1_SUITE_data/Extension-Addition-Group.asn @@ -1,7 +1,7 @@ -- -- %CopyrightBegin% -- --- Copyright Ericsson AB 2001-2013. All Rights Reserved. +-- Copyright Ericsson AB 2001-2016. All Rights Reserved. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl index 7f7c013f30..2b2e539ec0 100644 --- a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl +++ b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2011. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE_data/a_SeqIn.erl b/lib/asn1/test/asn1_SUITE_data/a_SeqIn.erl index e8db7231f1..948f382e1a 100644 --- a/lib/asn1/test/asn1_SUITE_data/a_SeqIn.erl +++ b/lib/asn1/test/asn1_SUITE_data/a_SeqIn.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE_data/b_SeqIn.erl b/lib/asn1/test/asn1_SUITE_data/b_SeqIn.erl index ba73a72132..1c3352df44 100644 --- a/lib/asn1/test/asn1_SUITE_data/b_SeqIn.erl +++ b/lib/asn1/test/asn1_SUITE_data/b_SeqIn.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl index 3600ccac26..6cf8ecf451 100644 --- a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl +++ b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_SUITE_data/test_records.erl b/lib/asn1/test/asn1_SUITE_data/test_records.erl index adfc98600c..9fd07c1449 100644 --- a/lib/asn1/test/asn1_SUITE_data/test_records.erl +++ b/lib/asn1/test/asn1_SUITE_data/test_records.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2011. All Rights Reserved. +%% Copyright Ericsson AB 2005-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,9 +23,6 @@ -export(['check_record_names_OTP-5812'/1]). -%-include("test_server.hrl"). -%-include_lib("test_server/include/test_server.hrl"). - -define(line,put(test_server_loc,{?MODULE,?LINE}),). -include("NBAP-PDU-Discriptions.hrl"). @@ -48,19 +45,19 @@ check_record_names({initiatingMessage, transactionID = _TransactionID, value = Value}}) -> - ?line ok = check_record_ProcedureID(ProcedureID), - ?line ok = check_record_Value(Value). + ok = check_record_ProcedureID(ProcedureID), + ok = check_record_Value(Value). check_record_ProcedureID(#'ProcedureID'{}) -> ok; check_record_ProcedureID(_) -> false. check_record_Value(#'ResourceStatusIndication'{protocolIEs = ProtocolIEs}) -> - ?line ok = check_record_ProtocolIEs(ProtocolIEs); + ok = check_record_ProtocolIEs(ProtocolIEs); check_record_Value(_) -> false. check_record_ProtocolIEs([#'ProtocolIE-Field'{value =IndicationType}|_]) -> - ?line ok = check_record_NFResourceStatusInd(IndicationType); + ok = check_record_NFResourceStatusInd(IndicationType); check_record_ProtocolIEs(_) -> false. check_record_NFResourceStatusInd({'no-Failure',#'No-Failure-ResourceStatusInd'{'local-Cell-InformationList'=[LCIPF]}}) -> @@ -68,13 +65,13 @@ check_record_NFResourceStatusInd({'no-Failure',#'No-Failure-ResourceStatusInd'{' check_record_NFResourceStatusInd(_) -> false. 'check_record_NFResourceStatusInd_ProtocolIE-Field'(#'ProtocolIE-Field'{value=LCI}) -> - ?line ok = check_record_LCInfoResourceStatusInd(LCI); + ok = check_record_LCInfoResourceStatusInd(LCI); 'check_record_NFResourceStatusInd_ProtocolIE-Field'(_) -> false. check_record_LCInfoResourceStatusInd(#'Local-Cell-InformationItem-ResourceStatusInd'{commonChannelsCapacityConsumptionLaw=[CCCCL],dedicatedChannelsCapacityConsumptionLaw=[DCCCL],'iE-Extensions' = [LCIRE]}) -> - ?line ok = check_record_CCCCL(CCCCL), - ?line ok = check_record_DCCCL(DCCCL), - ?line ok = check_record_LCIRE(LCIRE). + ok = check_record_CCCCL(CCCCL), + ok = check_record_DCCCL(DCCCL), + ok = check_record_LCIRE(LCIRE). check_record_CCCCL(#'CommonChannelsCapacityConsumptionLaw_SEQOF'{}) -> ok; diff --git a/lib/asn1/test/asn1_SUITE_data/testobj.erl b/lib/asn1/test/asn1_SUITE_data/testobj.erl index efb1cf4713..a0e00f8314 100644 --- a/lib/asn1/test/asn1_SUITE_data/testobj.erl +++ b/lib/asn1/test/asn1_SUITE_data/testobj.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/asn1_app_test.erl b/lib/asn1/test/asn1_app_test.erl index 71aad5c62f..028322f555 100644 --- a/lib/asn1/test/asn1_app_test.erl +++ b/lib/asn1/test/asn1_app_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2012. All Rights Reserved. +%% Copyright Ericsson AB 2005-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -42,8 +42,6 @@ end_per_group(_GroupName, Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -init_per_suite(suite) -> []; -init_per_suite(doc) -> []; init_per_suite(Config) when is_list(Config) -> case is_app(asn1) of {ok, AppFile} -> @@ -64,18 +62,13 @@ is_app(App) -> end. -end_per_suite(suite) -> []; -end_per_suite(doc) -> []; end_per_suite(Config) when is_list(Config) -> Config. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -fields(suite) -> - []; -fields(doc) -> - []; +%% . fields(Config) when is_list(Config) -> AppFile = key1search(app_file, Config), Fields = [vsn, description, modules, registered, applications], @@ -103,10 +96,7 @@ check_field(Name, AppFile, Missing) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -modules(suite) -> - []; -modules(doc) -> - []; +%% . modules(Config) when is_list(Config) -> AppFile = key1search(app_file, Config), Mods = key1search(modules, AppFile), @@ -176,10 +166,7 @@ extra_modules(Mods, [Mod|Ebins], Extra) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -exportall(suite) -> - []; -exportall(doc) -> - []; +%% . exportall(Config) when is_list(Config) -> AppFile = key1search(app_file, Config), Mods = key1search(modules, AppFile), @@ -209,10 +196,7 @@ check_export_all([Mod|Mods]) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -app_depend(suite) -> - []; -app_depend(doc) -> - []; +%% . app_depend(Config) when is_list(Config) -> AppFile = key1search(app_file, Config), Apps = key1search(applications, AppFile), diff --git a/lib/asn1/test/asn1_appup_test.erl b/lib/asn1/test/asn1_appup_test.erl index 7df6190f92..54540e53cc 100644 --- a/lib/asn1/test/asn1_appup_test.erl +++ b/lib/asn1/test/asn1_appup_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2010. All Rights Reserved. +%% Copyright Ericsson AB 2005-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -42,14 +42,10 @@ end_per_group(_GroupName, Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -init_per_suite(suite) -> []; -init_per_suite(doc) -> []; init_per_suite(Config) when is_list(Config) -> Config. -end_per_suite(suite) -> []; -end_per_suite(doc) -> []; end_per_suite(Config) when is_list(Config) -> Config. diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl index ae2e5641ec..dc614db4f2 100644 --- a/lib/asn1/test/asn1_test_lib.erl +++ b/lib/asn1/test/asn1_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,24 +21,29 @@ -module(asn1_test_lib). -export([compile/3,compile_all/3,compile_erlang/3, + rm_dirs/1, hex_to_bin/1, match_value/2, parallel/0, roundtrip/3,roundtrip/4,roundtrip_enc/3,roundtrip_enc/4]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). run_dialyzer() -> false. compile(File, Config, Options) -> compile_all([File], Config, Options). -compile_all(Files, Config, Options) -> - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), - [compile_file(filename:join(DataDir, F), [{outdir, CaseDir}, - debug_info|Options]) - || F <- Files], +compile_all(Files, Config, Options0) -> + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), + Options = [{outdir,CaseDir},debug_info|Options0], + + Comp = fun(F) -> + compile_file(filename:join(DataDir, F), Options) + end, + p_run(Comp, Files), + dialyze(Files, Options), ok. @@ -93,18 +98,30 @@ compile_file(File, Options) -> try ok = asn1ct:compile(File, [warnings_as_errors|Options]) catch - Class:Reason -> - ct:print("Failed to compile ~s\n", [File]), - erlang:error({compile_failed, {File, Options}, {Class, Reason}}) + _:Reason -> + ct:print("Failed to compile ~s\n~p", [File,Reason]), + error end. compile_erlang(Mod, Config, Options) -> - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), M = list_to_atom(Mod), {ok, M} = compile:file(filename:join(DataDir, Mod), [report,{i,CaseDir},{outdir,CaseDir}|Options]). +rm_dirs([Dir|Dirs]) -> + {ok,L0} = file:list_dir(Dir), + L = [filename:join(Dir, F) || F <- L0], + IsDir = fun(F) -> filelib:is_dir(F) end, + {Subdirs,Files} = lists:partition(IsDir, L), + _ = [ok = file:delete(F) || F <- Files], + rm_dirs(Subdirs), + ok = file:del_dir(Dir), + rm_dirs(Dirs); +rm_dirs([]) -> + ok. + hex_to_bin(S) -> << <<(hex2num(C)):4>> || C <- S, C =/= $\s >>. @@ -206,3 +223,38 @@ ber_get_len(<<0:1,L:7,T/binary>>) -> ber_get_len(<<1:1,Octets:7,T0/binary>>) -> <<L:Octets/unit:8,T/binary>> = T0, {L,T}. + +%% p_run(fun(Data) -> ok|error, List) -> ok +%% Will fail the test case if there were any errors. + +p_run(Test, List) -> + S = erlang:system_info(schedulers), + N = case test_server:is_cover() of + false -> + S + 1; + true -> + %% Cover is running. Using too many processes + %% could slow us down. + min(S, 4) + end, + %%io:format("p_run: ~p parallel processes\n", [N]), + p_run_loop(Test, List, N, [], 0). + +p_run_loop(_, [], _, [], Errors) -> + case Errors of + 0 -> ok; + N -> ct:fail({N,errors}) + end; +p_run_loop(Test, [H|T], N, Refs, Errors) when length(Refs) < N -> + {_,Ref} = erlang:spawn_monitor(fun() -> exit(Test(H)) end), + p_run_loop(Test, T, N, [Ref|Refs], Errors); +p_run_loop(Test, List, N, Refs0, Errors0) -> + receive + {'DOWN',Ref,process,_,Res} -> + Errors = case Res of + ok -> Errors0; + error -> Errors0+1 + end, + Refs = Refs0 -- [Ref], + p_run_loop(Test, List, N, Refs, Errors) + end. diff --git a/lib/asn1/test/ber_decode_error.erl b/lib/asn1/test/ber_decode_error.erl index 8268698b8d..c0840e02d7 100644 --- a/lib/asn1/test/ber_decode_error.erl +++ b/lib/asn1/test/ber_decode_error.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2013. All Rights Reserved. +%% Copyright Ericsson AB 1999-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl index a3413d1b3d..6ce77d93fb 100644 --- a/lib/asn1/test/error_SUITE.erl +++ b/lib/asn1/test/error_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2013. All Rights Reserved. +%% Copyright Ericsson AB 2013-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ object_sets/1,parameterization/1, syntax/1,table_constraints/1,tags/1,values/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). suite() -> [{ct_hooks, [ts_install_cth]}]. @@ -929,8 +929,8 @@ values(Config) -> run({Mod,Spec}, Config) -> Base = atom_to_list(Mod) ++ ".asn1", - File = filename:join(?config(priv_dir, Config), Base), - Include0 = filename:dirname(?config(data_dir, Config)), + File = filename:join(proplists:get_value(priv_dir, Config), Base), + Include0 = filename:dirname(proplists:get_value(data_dir, Config)), Include = filename:join(filename:dirname(Include0), "asn1_SUITE_data"), ok = file:write_file(File, Spec), asn1ct:compile(File, [{i, Include}]). diff --git a/lib/asn1/test/h323test.erl b/lib/asn1/test/h323test.erl index 39097a9330..935af0ba09 100644 --- a/lib/asn1/test/h323test.erl +++ b/lib/asn1/test/h323test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2012. All Rights Reserved. +%% Copyright Ericsson AB 1999-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(h323test). -export([run/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). run(per) -> run(); run(_Rules) -> ok. diff --git a/lib/asn1/test/syntax_SUITE.erl b/lib/asn1/test/syntax_SUITE.erl index 2c23416433..442ec59c70 100644 --- a/lib/asn1/test/syntax_SUITE.erl +++ b/lib/asn1/test/syntax_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ types/1, values/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). suite() -> [{ct_hooks, [ts_install_cth]}]. @@ -305,7 +305,7 @@ run(List, File, Config) -> run(List, File0, Config, Module) -> Base = File0 ++ ".asn1", - File = filename:join(?config(priv_dir, Config), Base), + File = filename:join(proplists:get_value(priv_dir, Config), Base), case run_1(List, Base, File, Module, 0) of 0 -> ok; Errors -> ?t:fail(Errors) diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl index 33515403d1..4c632aab81 100644 --- a/lib/asn1/test/testChoExtension.erl +++ b/lib/asn1/test/testChoExtension.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([extension/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). extension(_Rules) -> diff --git a/lib/asn1/test/testChoExternal.erl b/lib/asn1/test/testChoExternal.erl index 980b837475..22f4ad859a 100644 --- a/lib/asn1/test/testChoExternal.erl +++ b/lib/asn1/test/testChoExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testChoExternal). -export([external/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). external(_Rules) -> diff --git a/lib/asn1/test/testChoOptional.erl b/lib/asn1/test/testChoOptional.erl index d573e76a89..1f318315e9 100644 --- a/lib/asn1/test/testChoOptional.erl +++ b/lib/asn1/test/testChoOptional.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testChoPrim.erl b/lib/asn1/test/testChoPrim.erl index abf3fcdb81..573c482f2b 100644 --- a/lib/asn1/test/testChoPrim.erl +++ b/lib/asn1/test/testChoPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([bool/1]). -export([int/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). bool(Rules) -> roundtrip('ChoCon', {bool0,true}), diff --git a/lib/asn1/test/testChoRecursive.erl b/lib/asn1/test/testChoRecursive.erl index a307d448ed..1147d08442 100644 --- a/lib/asn1/test/testChoRecursive.erl +++ b/lib/asn1/test/testChoRecursive.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([recursive/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('ChoRec_something',{a, b, c}). -record('ChoRec2_something',{a, b, c}). diff --git a/lib/asn1/test/testChoTypeRefCho.erl b/lib/asn1/test/testChoTypeRefCho.erl index 378a43fa59..e0306425b9 100644 --- a/lib/asn1/test/testChoTypeRefCho.erl +++ b/lib/asn1/test/testChoTypeRefCho.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([choice/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). choice(_Rules) -> roundtrip('ChoTRcho', {choCho,{choInt,88}}), diff --git a/lib/asn1/test/testChoTypeRefPrim.erl b/lib/asn1/test/testChoTypeRefPrim.erl index 3541277674..a7b77477a5 100644 --- a/lib/asn1/test/testChoTypeRefPrim.erl +++ b/lib/asn1/test/testChoTypeRefPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([prim/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). prim(_Rules) -> roundtrip('ChoTR', {bool,true}), diff --git a/lib/asn1/test/testChoTypeRefSeq.erl b/lib/asn1/test/testChoTypeRefSeq.erl index c582d6f0fc..f00b185e0c 100644 --- a/lib/asn1/test/testChoTypeRefSeq.erl +++ b/lib/asn1/test/testChoTypeRefSeq.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([seq/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('ChoSeq', {seqInt, seqOs}). -record('ChoSeqImp', {seqInt, seqOs}). diff --git a/lib/asn1/test/testChoTypeRefSet.erl b/lib/asn1/test/testChoTypeRefSet.erl index 2d4f6cce4b..87de6057d9 100644 --- a/lib/asn1/test/testChoTypeRefSet.erl +++ b/lib/asn1/test/testChoTypeRefSet.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([set/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('ChoSet', {setInt, setOs}). -record('ChoSetImp', {setInt, setOs}). diff --git a/lib/asn1/test/testChoiceIndefinite.erl b/lib/asn1/test/testChoiceIndefinite.erl index d796871620..765e772648 100644 --- a/lib/asn1/test/testChoiceIndefinite.erl +++ b/lib/asn1/test/testChoiceIndefinite.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2012. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(per) -> ok; main(ber) -> diff --git a/lib/asn1/test/testCompactBitString.erl b/lib/asn1/test/testCompactBitString.erl index 6265e20ab2..319ecc1a59 100644 --- a/lib/asn1/test/testCompactBitString.erl +++ b/lib/asn1/test/testCompactBitString.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index 60b7994929..6a1fbe4f73 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([int_constraints/1,refed_NNL_name/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). int_constraints(Rules) -> diff --git a/lib/asn1/test/testContextSwitchingTypes.erl b/lib/asn1/test/testContextSwitchingTypes.erl index f1af6cf0e5..10012908a9 100644 --- a/lib/asn1/test/testContextSwitchingTypes.erl +++ b/lib/asn1/test/testContextSwitchingTypes.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([test/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test(Config) -> ValT_1 = 'ContextSwitchingTypes':'val1-T'(), @@ -38,7 +38,7 @@ test(Config) -> check_EXTERNAL(enc_dec('T', ValT_4)), {ok,ValT2} = asn1ct:value('ContextSwitchingTypes', 'T', - [{i,?config(case_dir, Config)}]), + [{i,proplists:get_value(case_dir, Config)}]), io:format("ValT2 ~p~n",[ValT2]), check_EXTERNAL(enc_dec('T', ValT2)), diff --git a/lib/asn1/test/testDER.erl b/lib/asn1/test/testDER.erl index 195d8fe5a4..c8f28be5f6 100644 --- a/lib/asn1/test/testDER.erl +++ b/lib/asn1/test/testDER.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2012. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([test/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test() -> Val = {'Set',12,{version,214},true}, diff --git a/lib/asn1/test/testDeepTConstr.erl b/lib/asn1/test/testDeepTConstr.erl index 50291bf645..9169cf5953 100644 --- a/lib/asn1/test/testDeepTConstr.erl +++ b/lib/asn1/test/testDeepTConstr.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(_Erule) -> Val1 = {substrings, diff --git a/lib/asn1/test/testDef.erl b/lib/asn1/test/testDef.erl index c07665d097..eae8e6d378 100644 --- a/lib/asn1/test/testDef.erl +++ b/lib/asn1/test/testDef.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Def1',{bool0, bool1 = asn1_DEFAULT, diff --git a/lib/asn1/test/testDoubleEllipses.erl b/lib/asn1/test/testDoubleEllipses.erl index 8dcd979d6a..4b50869fd2 100644 --- a/lib/asn1/test/testDoubleEllipses.erl +++ b/lib/asn1/test/testDoubleEllipses.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2014. All Rights Reserved. +%% Copyright Ericsson AB 2007-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Seq',{a, c}). -record('SeqV1',{a, b}). diff --git a/lib/asn1/test/testEnumExt.erl b/lib/asn1/test/testEnumExt.erl index 122d198205..0f8ca816d4 100644 --- a/lib/asn1/test/testEnumExt.erl +++ b/lib/asn1/test/testEnumExt.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1998-2013. All Rights Reserved. +%% Copyright Ericsson AB 1998-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(Rule) when Rule =:= per; Rule =:= uper -> io:format("main(~p)~n",[Rule]), diff --git a/lib/asn1/test/testExtensibilityImplied.erl b/lib/asn1/test/testExtensibilityImplied.erl index a039bec576..3b2e021c48 100644 --- a/lib/asn1/test/testExtensibilityImplied.erl +++ b/lib/asn1/test/testExtensibilityImplied.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testFragmented.erl b/lib/asn1/test/testFragmented.erl index 99867c016e..59e5c99c61 100644 --- a/lib/asn1/test/testFragmented.erl +++ b/lib/asn1/test/testFragmented.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2013. All Rights Reserved. +%% Copyright Ericsson AB 2013-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testINSTANCE_OF.erl b/lib/asn1/test/testINSTANCE_OF.erl index afff05a4c5..aceaaf7a1d 100644 --- a/lib/asn1/test/testINSTANCE_OF.erl +++ b/lib/asn1/test/testINSTANCE_OF.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2012. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testINSTANCE_OF). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(_Erule) -> Int = roundtrip('Int', 3), diff --git a/lib/asn1/test/testImporting.erl b/lib/asn1/test/testImporting.erl index 5eb950100d..79ad48c0f4 100644 --- a/lib/asn1/test/testImporting.erl +++ b/lib/asn1/test/testImporting.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl index 1b38d5414e..5a9f47d865 100644 --- a/lib/asn1/test/testInfObj.erl +++ b/lib/asn1/test/testInfObj.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testInfObjExtract.erl b/lib/asn1/test/testInfObjExtract.erl index ba1d92c100..b51611f95f 100644 --- a/lib/asn1/test/testInfObjExtract.erl +++ b/lib/asn1/test/testInfObjExtract.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testInfObjectClass.erl b/lib/asn1/test/testInfObjectClass.erl index 271be63fc8..560986fac9 100644 --- a/lib/asn1/test/testInfObjectClass.erl +++ b/lib/asn1/test/testInfObjectClass.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(Rule) -> %% this test is added for OTP-4591, to test that elements in decoded diff --git a/lib/asn1/test/testMegaco.erl b/lib/asn1/test/testMegaco.erl index b1b1c866be..0be798b962 100644 --- a/lib/asn1/test/testMegaco.erl +++ b/lib/asn1/test/testMegaco.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([compile/3,main/2]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). compile(Config, Erule, Options) -> asn1_test_lib:compile("MEDIA-GATEWAY-CONTROL.asn", Config, [Erule|Options]), @@ -32,13 +32,13 @@ compile(Config, Erule, Options) -> main(no_module,_) -> ok; main('OLD-MEDIA-GATEWAY-CONTROL',Config) -> - CaseDir = ?config(case_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), {ok,Msg} = asn1ct:value('OLD-MEDIA-GATEWAY-CONTROL','MegacoMessage', [{i, CaseDir}]), asn1_test_lib:roundtrip('OLD-MEDIA-GATEWAY-CONTROL', 'MegacoMessage', Msg), ok; main('MEDIA-GATEWAY-CONTROL'=Mod, Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), Files = filelib:wildcard(filename:join([DataDir,megacomessages,"*.val"])), lists:foreach(fun(File) -> {ok,Bin} = file:read_file(File), diff --git a/lib/asn1/test/testMergeCompile.erl b/lib/asn1/test/testMergeCompile.erl index 6bf7aaa1d6..f0e68e07b7 100644 --- a/lib/asn1/test/testMergeCompile.erl +++ b/lib/asn1/test/testMergeCompile.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([main/1,mvrasn/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('InitiatingMessage',{procedureCode,criticality,value}). -record('Iu-ReleaseCommand',{protocolIEs,protocolExtensions}). @@ -66,16 +66,16 @@ main(Erule) -> mvrasn(Erule) -> case Erule of ber -> - ?line ok = test(isd), - ?line ok = test(isd2), - ?line ok = test(dsd), - ?line ok = test(ul_res), - ?line ok = test(seqofseq), - ?line ok = test('InsertSubscriberDataArg'); + ok = test(isd), + ok = test(isd2), + ok = test(dsd), + ok = test(ul_res), + ok = test(seqofseq), + ok = test('InsertSubscriberDataArg'); _ -> ok end, - ?line ok = test(mvrasn6,'InsertSubscriberDataArg'). + ok = test(mvrasn6,'InsertSubscriberDataArg'). test(isd)-> EncPdu = <<48,128,129,7,145,148,113,50,1,0,241,131,1,0,176,128,5,0, diff --git a/lib/asn1/test/testMultipleLevels.erl b/lib/asn1/test/testMultipleLevels.erl index 0f465ee9da..c610e59f3d 100644 --- a/lib/asn1/test/testMultipleLevels.erl +++ b/lib/asn1/test/testMultipleLevels.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testNBAPsystem.erl b/lib/asn1/test/testNBAPsystem.erl index e0eeb9fe0c..1af283af42 100644 --- a/lib/asn1/test/testNBAPsystem.erl +++ b/lib/asn1/test/testNBAPsystem.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2013. All Rights Reserved. +%% Copyright Ericsson AB 2005-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([compile/2,test/2]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('InitiatingMessage',{ procedureID, criticality, messageDiscriminator, transactionID, value}). @@ -92,23 +92,23 @@ compile(Config, Options) -> test(_Erule,Config) -> - ?line ok = enc_audit_req_msg(), - ?line ok = cell_setup_req_msg_test(), + ok = enc_audit_req_msg(), + ok = cell_setup_req_msg_test(), ticket_5812(Config). ticket_5812(Config) -> - ?line Msg = v_5812(), + Msg = v_5812(), {ok,B2} = 'NBAP-PDU-Discriptions':encode('NBAP-PDU', Msg), V = <<0,28,74,0,3,48,0,0,1,0,123,64,41,0,0,0,126,64,35,95,208,2,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,145,0,1,205,0,0,0,0,2,98,64,1,128>>, - ?line ok = compare(V,B2), + ok = compare(V,B2), {ok,Msg2} = 'NBAP-PDU-Discriptions':decode('NBAP-PDU', B2), - ?line ok = check_record_names(Msg2,Config). + ok = check_record_names(Msg2,Config). enc_audit_req_msg() -> Msg = {initiatingMessage, audit_req_msg()}, {ok,B} = 'NBAP-PDU-Discriptions':encode('NBAP-PDU', Msg), {ok,_Msg} = 'NBAP-PDU-Discriptions':decode('NBAP-PDU', B), - ?line {initiatingMessage, + {initiatingMessage, #'InitiatingMessage'{value=#'AuditRequest'{protocolIEs=[{_,114,ignore,_}], protocolExtensions = asn1_NOVALUE}}} = _Msg, io:format("Msg: ~n~P~n~n_Msg:~n~P~n",[Msg,15,_Msg,15]), @@ -285,8 +285,8 @@ compare(_,_) -> false. check_record_names(Msg,Config) -> - DataDir = ?config(data_dir,Config), - CaseDir = ?config(case_dir,Config), + DataDir = proplists:get_value(data_dir,Config), + CaseDir = proplists:get_value(case_dir,Config), {ok, test_records} = compile:file(filename:join([DataDir, "test_records"]), [{i, CaseDir}]), ok = test_records:'check_record_names_OTP-5812'(Msg). diff --git a/lib/asn1/test/testOpenTypeImplicitTag.erl b/lib/asn1/test/testOpenTypeImplicitTag.erl index 01e0a5e07f..b1534bd268 100644 --- a/lib/asn1/test/testOpenTypeImplicitTag.erl +++ b/lib/asn1/test/testOpenTypeImplicitTag.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2012. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main(_Rules) -> roundtrip('Seq', {'Seq',<<1,1,255>>,<<1,1,255>>,12,<<1,1,255>>}), diff --git a/lib/asn1/test/testOpt.erl b/lib/asn1/test/testOpt.erl index 1f96331966..d7e194078e 100644 --- a/lib/asn1/test/testOpt.erl +++ b/lib/asn1/test/testOpt.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testOpt). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Opt1',{bool0, bool1 = asn1_NOVALUE, diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl index f4a696ff38..1455c6e81a 100644 --- a/lib/asn1/test/testParamBasic.erl +++ b/lib/asn1/test/testParamBasic.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('T11',{number, string=asn1_DEFAULT}). -record('T12',{number, string=asn1_DEFAULT}). diff --git a/lib/asn1/test/testParameterizedInfObj.erl b/lib/asn1/test/testParameterizedInfObj.erl index 592dc693f0..d485ef137e 100644 --- a/lib/asn1/test/testParameterizedInfObj.erl +++ b/lib/asn1/test/testParameterizedInfObj.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -export([main/2,param/1,ranap/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('AllocationOrRetentionPriority',{priorityLevel,iE_Extensions}). -record('ProtocolExtensionField',{id,criticality,extensionValue}). @@ -97,7 +97,7 @@ roundtrip(T, V) -> ranap(_Erule) -> PIEVal2 = [{'ProtocolIE-Field',4,ignore,{radioNetwork,'rab-pre-empted'}}], - ?line Val2 = + Val2 = #'InitiatingMessage'{procedureCode=1, criticality=ignore, value=#'Iu-ReleaseCommand'{protocolIEs=PIEVal2, @@ -121,8 +121,8 @@ param2(Config, Erule) -> {'ProtocolIE-Field',101,true}]}), %% Now remove the data after the extension mark in the object set. - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), Asn1SrcBase = "Param2.asn1", Asn1SrcFile0 = filename:join(DataDir, Asn1SrcBase), {ok,Src0} = file:read_file(Asn1SrcFile0), diff --git a/lib/asn1/test/testPrim.erl b/lib/asn1/test/testPrim.erl index dc2e0fa2e7..96a2dd6c79 100644 --- a/lib/asn1/test/testPrim.erl +++ b/lib/asn1/test/testPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ -export([null/1]). -export([real/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). bool(Rules) -> Types = ['Bool','BoolCon','BoolPri','BoolApp', diff --git a/lib/asn1/test/testPrimExternal.erl b/lib/asn1/test/testPrimExternal.erl index 56252241d4..f06acebd66 100644 --- a/lib/asn1/test/testPrimExternal.erl +++ b/lib/asn1/test/testPrimExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([external/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). external(_Rules) -> Types = ['NT', diff --git a/lib/asn1/test/testPrimStrings.erl b/lib/asn1/test/testPrimStrings.erl index 46793c6bff..cb97655c15 100644 --- a/lib/asn1/test/testPrimStrings.erl +++ b/lib/asn1/test/testPrimStrings.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ -export([utf8_string/1]). -export([fragmented/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). fragmented(Rules) -> Lens = fragmented_lengths(), @@ -54,7 +54,7 @@ fragmented_strings(Len, Types) -> ok. make_ns_value(0) -> []; -make_ns_value(N) -> [($0 - 1) + random:uniform(10)|make_ns_value(N-1)]. +make_ns_value(N) -> [($0 - 1) + rand:uniform(10)|make_ns_value(N-1)]. fragmented_lengths() -> K16 = 1 bsl 14, diff --git a/lib/asn1/test/testRfcs.erl b/lib/asn1/test/testRfcs.erl index 20eaee9982..da7333ef98 100644 --- a/lib/asn1/test/testRfcs.erl +++ b/lib/asn1/test/testRfcs.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,15 +23,15 @@ -export([compile/3,test/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). compile(Config, Erules, Options0) -> Options = [no_ok_wrapper|Options0], - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), Specs0 = filelib:wildcard("*.asn1", filename:join(DataDir, rfcs)), Specs = [filename:join(rfcs, Spec) || Spec <- Specs0], 122 = length(Specs), - CaseDir = ?config(case_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), asn1_test_lib:compile_all(Specs, Config, [Erules,{i,CaseDir}|Options]). test() -> diff --git a/lib/asn1/test/testSSLspecs.erl b/lib/asn1/test/testSSLspecs.erl index 9e51021ad2..9a0129d91a 100644 --- a/lib/asn1/test/testSSLspecs.erl +++ b/lib/asn1/test/testSSLspecs.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,11 +23,11 @@ -export([compile/2,run/1,compile_combined/2,run_combined/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). compile(Config, Options) -> - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), NewOptions = [{i, DataDir}, {i, CaseDir}|Options], asn1_test_lib:compile_all(["SSL-PKIX", "PKIXAttributeCertificate"], @@ -44,16 +44,16 @@ compile(Config, Options) -> Config, NewOptions). compile_combined(Config, ber=Rule) -> - DataDir = ?config(data_dir, Config), - CaseDir = ?config(case_dir, Config), + DataDir = proplists:get_value(data_dir, Config), + CaseDir = proplists:get_value(case_dir, Config), Options = [{i, CaseDir}, {i, DataDir}, Rule, der, compact_bit_string, asn1config], ok = remove_db_files_combined(CaseDir), asn1_test_lib:compile("OTP-PKIX.set.asn", Config, Options). remove_db_files(Dir) -> - ?line ok = remove_db_file(Dir ++ "PKIX1Explicit93.asn1db"), - ?line ok = remove_db_file(Dir ++ "PKIX1Implicit93.asn1db"). + ok = remove_db_file(Dir ++ "PKIX1Explicit93.asn1db"), + ok = remove_db_file(Dir ++ "PKIX1Implicit93.asn1db"). remove_db_file(File) -> case file:delete(File) of ok -> @@ -65,23 +65,23 @@ remove_db_file(File) -> end. remove_db_files_combined(Dir) -> - ?line ok = remove_db_file(Dir ++ "OTP-PKIX.asn1db"), - ?line ok = remove_db_file(Dir ++ "SSL-PKIX.asn1db"), - ?line ok = remove_db_file(Dir ++ "PKIXAttributeCertificate.asn1db"), - ?line ok = remove_db_file(Dir ++ "PKIX1Algorithms88.asn1db"), - ?line ok = remove_db_file(Dir ++ "PKIX1Explicit88.asn1db"), - ?line ok = remove_db_file(Dir ++ "PKIX1Implicit88.asn1db"). + ok = remove_db_file(Dir ++ "OTP-PKIX.asn1db"), + ok = remove_db_file(Dir ++ "SSL-PKIX.asn1db"), + ok = remove_db_file(Dir ++ "PKIXAttributeCertificate.asn1db"), + ok = remove_db_file(Dir ++ "PKIX1Algorithms88.asn1db"), + ok = remove_db_file(Dir ++ "PKIX1Explicit88.asn1db"), + ok = remove_db_file(Dir ++ "PKIX1Implicit88.asn1db"). run(ber) -> run1(1). run1(6) -> - ?line f1(6), - ?line f2(6), - ?line transform4(ex(7)); + f1(6), + f2(6), + transform4(ex(7)); run1(N) -> - ?line f1(N), - ?line f2(N), + f1(N), + f2(N), run1(N+1). @@ -93,22 +93,22 @@ f2(N) -> transform1(ATAV) -> - ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', + {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', ATAV), - ?line {ok, _ATAVDec} = 'SSL-PKIX':decode('AttributeTypeAndValue', + {ok, _ATAVDec} = 'SSL-PKIX':decode('AttributeTypeAndValue', ATAVEnc). transform2(ATAV) -> - ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', + {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', ATAV), - ?line {ok, _ATAVDec} = 'PKIX1Explicit88':decode('AttributeTypeAndValue', + {ok, _ATAVDec} = 'PKIX1Explicit88':decode('AttributeTypeAndValue', ATAVEnc). transform4(ATAV) -> - ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('Attribute', + {ok, ATAVEnc} = 'PKIX1Explicit88':encode('Attribute', ATAV), - ?line {ok, _ATAVDec} = 'PKIX1Explicit88':decode('Attribute', + {ok, _ATAVDec} = 'PKIX1Explicit88':decode('Attribute', ATAVEnc). @@ -144,8 +144,8 @@ ex(7) -> run_combined(ber) -> Cert = cert(), - ?line {ok,{'CertificatePKIX1Explicit88',{Type,UnDec},_,_}} = 'OTP-PKIX':decode_TBSCert_exclusive(Cert), - ?line {ok,_} = 'OTP-PKIX':decode_part(Type,UnDec), + {ok,{'CertificatePKIX1Explicit88',{Type,UnDec},_,_}} = 'OTP-PKIX':decode_TBSCert_exclusive(Cert), + {ok,_} = 'OTP-PKIX':decode_part(Type,UnDec), ok. cert() -> diff --git a/lib/asn1/test/testSelectionTypes.erl b/lib/asn1/test/testSelectionTypes.erl index d33cfcc694..b9f908b251 100644 --- a/lib/asn1/test/testSelectionTypes.erl +++ b/lib/asn1/test/testSelectionTypes.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSelectionTypes). -export([test/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test() -> ["Es"] = Val2 = ['SelectionType':einsteinium()], diff --git a/lib/asn1/test/testSeq2738.erl b/lib/asn1/test/testSeq2738.erl index 3c9e4a744e..105a04a15b 100644 --- a/lib/asn1/test/testSeq2738.erl +++ b/lib/asn1/test/testSeq2738.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2012. All Rights Reserved. +%% Copyright Ericsson AB 1999-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSeq2738). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqOptFake',{int, opt = asn1_NOVALUE}). -record('OptSeqFake',{bool = false}). diff --git a/lib/asn1/test/testSeqDefault.erl b/lib/asn1/test/testSeqDefault.erl index db0914bf0a..d9e9e60541 100644 --- a/lib/asn1/test/testSeqDefault.erl +++ b/lib/asn1/test/testSeqDefault.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -include("External.hrl"). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqDef1',{bool1 = asn1_DEFAULT, int1, seq1 = asn1_DEFAULT}). -record('SeqDef1Imp',{bool1 = asn1_DEFAULT, int1, seq1 = asn1_DEFAULT}). diff --git a/lib/asn1/test/testSeqExtension.erl b/lib/asn1/test/testSeqExtension.erl index 6b49b29047..f7885cb002 100644 --- a/lib/asn1/test/testSeqExtension.erl +++ b/lib/asn1/test/testSeqExtension.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -include("External.hrl"). -export([main/3]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqExt1',{}). -record('SeqExt2',{bool, int}). diff --git a/lib/asn1/test/testSeqExternal.erl b/lib/asn1/test/testSeqExternal.erl index a48794924f..8f2f2a8f94 100644 --- a/lib/asn1/test/testSeqExternal.erl +++ b/lib/asn1/test/testSeqExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -include("External.hrl"). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqXSet1',{set, bool, int}). -record('SeqXSet2',{bool, set, int}). diff --git a/lib/asn1/test/testSeqOf.erl b/lib/asn1/test/testSeqOf.erl index 898b8c1e15..d4cfafc278 100644 --- a/lib/asn1/test/testSeqOf.erl +++ b/lib/asn1/test/testSeqOf.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Seq1',{bool1, int1, seq1 = asn1_DEFAULT}). -record('Seq2',{seq2 = asn1_DEFAULT, bool2, int2}). diff --git a/lib/asn1/test/testSeqOfCho.erl b/lib/asn1/test/testSeqOfCho.erl index 82ac56ac50..268500d0e1 100644 --- a/lib/asn1/test/testSeqOfCho.erl +++ b/lib/asn1/test/testSeqOfCho.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqChoDef',{bool1, int1, seq1 = asn1_DEFAULT}). -record('SeqChoOpt',{bool1, int1, seq1 = asn1_NOVALUE}). diff --git a/lib/asn1/test/testSeqOfExternal.erl b/lib/asn1/test/testSeqOfExternal.erl index 560fdecb64..18f2767613 100644 --- a/lib/asn1/test/testSeqOfExternal.erl +++ b/lib/asn1/test/testSeqOfExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSeqOfExternal). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('NT',{os, bool}). diff --git a/lib/asn1/test/testSeqOfIndefinite.erl b/lib/asn1/test/testSeqOfIndefinite.erl index 4a0101834a..2f66baf9a8 100644 --- a/lib/asn1/test/testSeqOfIndefinite.erl +++ b/lib/asn1/test/testSeqOfIndefinite.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2012. All Rights Reserved. +%% Copyright Ericsson AB 1999-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,16 +22,16 @@ -export([main/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main() -> - ?line ok = test(isd), - ?line ok = test(isd2), - ?line ok = test(dsd), - ?line ok = test(ul_res), - ?line ok = test(prim), - ?line ok = test(seqofseq), - ?line ok = test('InsertSubscriberDataArg'). % OTP-4232 + ok = test(isd), + ok = test(isd2), + ok = test(dsd), + ok = test(ul_res), + ok = test(prim), + ok = test(seqofseq), + ok = test('InsertSubscriberDataArg'). % OTP-4232 test(isd)-> EncPdu = <<48,128,129,7,145,148,113,50,1,0,241,131,1,0,176,128,5,0, diff --git a/lib/asn1/test/testSeqOfTag.erl b/lib/asn1/test/testSeqOfTag.erl index 55f807199f..b6e62e15ef 100644 --- a/lib/asn1/test/testSeqOfTag.erl +++ b/lib/asn1/test/testSeqOfTag.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). diff --git a/lib/asn1/test/testSeqOptional.erl b/lib/asn1/test/testSeqOptional.erl index db615d6e4d..13d6615ca4 100644 --- a/lib/asn1/test/testSeqOptional.erl +++ b/lib/asn1/test/testSeqOptional.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ -include("External.hrl"). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqOpt1',{bool1 = asn1_NOVALUE, int1, seq1 = asn1_NOVALUE}). -record('SeqOpt1Imp',{bool1 = asn1_NOVALUE, int1, seq1 = asn1_NOVALUE}). diff --git a/lib/asn1/test/testSeqPrim.erl b/lib/asn1/test/testSeqPrim.erl index 6af0ce9287..7e782351d9 100644 --- a/lib/asn1/test/testSeqPrim.erl +++ b/lib/asn1/test/testSeqPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Seq',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}). -record('Empty',{}). diff --git a/lib/asn1/test/testSeqSetDefaultVal.erl b/lib/asn1/test/testSeqSetDefaultVal.erl index 86ab07a4a8..fd4ef9c088 100644 --- a/lib/asn1/test/testSeqSetDefaultVal.erl +++ b/lib/asn1/test/testSeqSetDefaultVal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2013. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/2]). -include("External.hrl"). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqInts',{a = asn1_DEFAULT, b = asn1_DEFAULT, diff --git a/lib/asn1/test/testSeqSetIndefinite.erl b/lib/asn1/test/testSeqSetIndefinite.erl index 8948e10ece..155da2c1ca 100644 --- a/lib/asn1/test/testSeqSetIndefinite.erl +++ b/lib/asn1/test/testSeqSetIndefinite.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2013. All Rights Reserved. +%% Copyright Ericsson AB 2013-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSeqSetIndefinite). -export([main/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). main() -> seq_indefinite(), diff --git a/lib/asn1/test/testSeqTag.erl b/lib/asn1/test/testSeqTag.erl index baa79ed428..cc561ffe72 100644 --- a/lib/asn1/test/testSeqTag.erl +++ b/lib/asn1/test/testSeqTag.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('SeqTag',{nt, imp, exp}). diff --git a/lib/asn1/test/testSeqTypeRefCho.erl b/lib/asn1/test/testSeqTypeRefCho.erl index 372be0c637..88993ef49a 100644 --- a/lib/asn1/test/testSeqTypeRefCho.erl +++ b/lib/asn1/test/testSeqTypeRefCho.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('SeqTRcho',{seqCho, seqChoE, 'seqCho-E', 'seqChoE-E'}). diff --git a/lib/asn1/test/testSeqTypeRefPrim.erl b/lib/asn1/test/testSeqTypeRefPrim.erl index 42554e758e..950c9b1de2 100644 --- a/lib/asn1/test/testSeqTypeRefPrim.erl +++ b/lib/asn1/test/testSeqTypeRefPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSeqTypeRefPrim). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqTR',{octStr, octStrI, octStrE, 'octStr-I', 'octStrI-I', 'octStrE-I', 'octStr-E', 'octStrI-E', 'octStrE-E'}). diff --git a/lib/asn1/test/testSeqTypeRefSeq.erl b/lib/asn1/test/testSeqTypeRefSeq.erl index ee30937af5..0d88e55d15 100644 --- a/lib/asn1/test/testSeqTypeRefSeq.erl +++ b/lib/asn1/test/testSeqTypeRefSeq.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Seq1',{bool1, int1, seq1}). -record('Seq2',{seq2, bool2, int2}). diff --git a/lib/asn1/test/testSeqTypeRefSet.erl b/lib/asn1/test/testSeqTypeRefSet.erl index ba690b4503..7d0fd20647 100644 --- a/lib/asn1/test/testSeqTypeRefSet.erl +++ b/lib/asn1/test/testSeqTypeRefSet.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SeqTRset',{seqSet, seqSetI, seqSetE, 'seqSet-I', 'seqSetI-I', 'seqSetE-I', 'seqSet-E', 'seqSetI-E', 'seqSetE-E'}). -record('SeqSet',{setInt, setOs}). diff --git a/lib/asn1/test/testSetDefault.erl b/lib/asn1/test/testSetDefault.erl index 4e34c01a52..6d84ee3204 100644 --- a/lib/asn1/test/testSetDefault.erl +++ b/lib/asn1/test/testSetDefault.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetDef1',{bool1 = asn1_DEFAULT, int1, set1 = asn1_DEFAULT}). -record('SetDef2',{set2 = asn1_DEFAULT, bool2, int2}). diff --git a/lib/asn1/test/testSetExtension.erl b/lib/asn1/test/testSetExtension.erl index 67977a2a31..58259e9f34 100644 --- a/lib/asn1/test/testSetExtension.erl +++ b/lib/asn1/test/testSetExtension.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -include("External.hrl"). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetExt1',{}). -record('SetExt2',{bool, int}). diff --git a/lib/asn1/test/testSetExternal.erl b/lib/asn1/test/testSetExternal.erl index e265cf1f3e..a9b1e3952e 100644 --- a/lib/asn1/test/testSetExternal.erl +++ b/lib/asn1/test/testSetExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). -include("External.hrl"). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetXSeq1',{seq, bool, int}). -record('SetXSeq2',{bool, seq, int}). diff --git a/lib/asn1/test/testSetOf.erl b/lib/asn1/test/testSetOf.erl index 4ff90676aa..62caa8b3f9 100644 --- a/lib/asn1/test/testSetOf.erl +++ b/lib/asn1/test/testSetOf.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Set1',{bool1, int1, set1 = asn1_DEFAULT}). -record('Set2',{set2 = asn1_DEFAULT, bool2, int2}). diff --git a/lib/asn1/test/testSetOfCho.erl b/lib/asn1/test/testSetOfCho.erl index 002fa9be0a..a6ff2a79be 100644 --- a/lib/asn1/test/testSetOfCho.erl +++ b/lib/asn1/test/testSetOfCho.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetChoDef',{bool1, int1, set1 = asn1_DEFAULT}). -record('SetChoOpt',{bool1, int1, set1 = asn1_NOVALUE}). diff --git a/lib/asn1/test/testSetOfExternal.erl b/lib/asn1/test/testSetOfExternal.erl index 60bde33962..faa7cfd239 100644 --- a/lib/asn1/test/testSetOfExternal.erl +++ b/lib/asn1/test/testSetOfExternal.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSetOfExternal). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('NT',{os, bool}). diff --git a/lib/asn1/test/testSetOfTag.erl b/lib/asn1/test/testSetOfTag.erl index 96dc9942d7..ccaded42ab 100644 --- a/lib/asn1/test/testSetOfTag.erl +++ b/lib/asn1/test/testSetOfTag.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSetOfTag). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('SetTagNt',{nt}). diff --git a/lib/asn1/test/testSetOptional.erl b/lib/asn1/test/testSetOptional.erl index a0010d203a..8d38f4c9d5 100644 --- a/lib/asn1/test/testSetOptional.erl +++ b/lib/asn1/test/testSetOptional.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testSetPrim.erl b/lib/asn1/test/testSetPrim.erl index a4b8bb2f09..f91dfeb9bf 100644 --- a/lib/asn1/test/testSetPrim.erl +++ b/lib/asn1/test/testSetPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Set',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}). -record('Empty',{}). diff --git a/lib/asn1/test/testSetTag.erl b/lib/asn1/test/testSetTag.erl index b963ecb4b3..528769c85b 100644 --- a/lib/asn1/test/testSetTag.erl +++ b/lib/asn1/test/testSetTag.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testSetTag). -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('SetTag',{nt, imp, exp}). diff --git a/lib/asn1/test/testSetTypeRefCho.erl b/lib/asn1/test/testSetTypeRefCho.erl index adffb646fb..3015faaa0f 100644 --- a/lib/asn1/test/testSetTypeRefCho.erl +++ b/lib/asn1/test/testSetTypeRefCho.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("External.hrl"). -record('SetTRcho',{setCho, setChoE, 'setCho-E', 'setChoE-E'}). diff --git a/lib/asn1/test/testSetTypeRefPrim.erl b/lib/asn1/test/testSetTypeRefPrim.erl index e20b6c57ab..1f31736f1c 100644 --- a/lib/asn1/test/testSetTypeRefPrim.erl +++ b/lib/asn1/test/testSetTypeRefPrim.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetTR',{octStr, octStrI, octStrE, 'octStr-I', 'octStrI-I', 'octStrE-I', 'octStr-E', 'octStrI-E', 'octStrE-E'}). diff --git a/lib/asn1/test/testSetTypeRefSeq.erl b/lib/asn1/test/testSetTypeRefSeq.erl index 0d2bd6b32d..d829a5031c 100644 --- a/lib/asn1/test/testSetTypeRefSeq.erl +++ b/lib/asn1/test/testSetTypeRefSeq.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('SetTRseq',{setSeq, setSeqI, setSeqE, 'setSeq-I', 'setSeqI-I', 'setSeqE-I', 'setSeq-E', 'setSeqI-E', 'setSeqE-E'}). -record('SetSeq',{seqInt, seqOs}). diff --git a/lib/asn1/test/testSetTypeRefSet.erl b/lib/asn1/test/testSetTypeRefSet.erl index 85d9bf52cd..df9732e52a 100644 --- a/lib/asn1/test/testSetTypeRefSet.erl +++ b/lib/asn1/test/testSetTypeRefSet.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([main/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -record('Set1',{bool1, int1, set1}). -record('Set2',{set2, bool2, int2}). diff --git a/lib/asn1/test/testTCAP.erl b/lib/asn1/test/testTCAP.erl index 6c66d73feb..422ae1f0fc 100644 --- a/lib/asn1/test/testTCAP.erl +++ b/lib/asn1/test/testTCAP.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2013. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([compile/2,test/2,compile_asn1config/2,test_asn1config/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). compile(Config, Options) -> Files = ["Remote-Operations-Information-Objects", @@ -39,7 +39,6 @@ compile_asn1config(Config, Options) -> asn1_test_lib:compile_erlang("TCAPPackage_msg", Config, []). test(Erule,_Config) -> -% ?line OutDir = ?config(priv_dir,Config), %% testing OTP-4798, open type encoded with indefinite length {ok,_Res} = 'TCAPMessages-simple':decode('MessageType', val_OTP_4798(Erule)), @@ -49,20 +48,17 @@ test(Erule,_Config) -> val_OTP_4799(Erule)), %% testing vance shipley's problems. Parameterized object sets. - ?line Val3 = 'TCAPPackage_msg':val('PackageType',unidirectional), + Val3 = 'TCAPPackage_msg':val('PackageType',unidirectional), Res3 = enc_dec('PackageType', Val3), - ?line ok = 'TCAPPackage_msg':check_result('PackageType',unidirectional,Res3), -%% ?line io:format("Res3:~n~p~n~n",[Res3]), + ok = 'TCAPPackage_msg':check_result('PackageType',unidirectional,Res3), - ?line Val4 = 'TCAPPackage_msg':val('PackageType',abort), + Val4 = 'TCAPPackage_msg':val('PackageType',abort), Res4 = enc_dec('PackageType', Val4), - ?line ok = 'TCAPPackage_msg':check_result('PackageType',abort,Res4), -%% ?line io:format("Res4:~n~p~n~n",[Res4]), + ok = 'TCAPPackage_msg':check_result('PackageType',abort,Res4), - ?line Val5 = 'TCAPPackage_msg':val('PackageType',response), + Val5 = 'TCAPPackage_msg':val('PackageType',response), Res5 = enc_dec('PackageType', Val5), - ?line ok = 'TCAPPackage_msg':check_result('PackageType',response,Res5). -%% ?line io:format("Res5:~n~p~n~n",[Res5]). + ok = 'TCAPPackage_msg':check_result('PackageType',response,Res5). val_OTP_4798(ber) -> [100,129,176,73,4,57,3,17,80,107,42,40,40,6,7,0,17,134,5,1,1,1,160,29,97,27,128,2,7,128,161,9,6,7,4,0,0,1,0,14,2,162,3,2,1,0,163,5,161,3,2,1,0,108,128,162,120,2,1,0,48,115,2,1,56,48,128,48,34,4,16,203,87,215,196,217,93,235,90,64,131,106,145,39,26,25,236,4,4,197,241,81,112,4,8,78,225,34,196,215,212,200,0,48,34,4,16,145,125,27,67,42,144,6,161,207,112,55,75,200,191,191,28,4,4,226,219,242,123,4,8,72,46,130,28,206,178,168,0,48,34,4,16,1,8,20,29,70,160,218,160,125,188,244,174,113,115,253,245,4,4,26,5,90,160,4,8,252,75,149,98,153,224,140,0,0,0,0,0]; diff --git a/lib/asn1/test/testTcapsystem.erl b/lib/asn1/test/testTcapsystem.erl index a050ceac61..ceff4f6b50 100644 --- a/lib/asn1/test/testTcapsystem.erl +++ b/lib/asn1/test/testTcapsystem.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl index 30e31796e2..bd8da85735 100644 --- a/lib/asn1/test/testTimer.erl +++ b/lib/asn1/test/testTimer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(testTimer). -export([go/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(times, 5000). diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl index e75cec04c9..17f1c74dcb 100644 --- a/lib/asn1/test/testTypeValueNotation.erl +++ b/lib/asn1/test/testTypeValueNotation.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2013. All Rights Reserved. +%% Copyright Ericsson AB 2002-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testUniqueObjectSets.erl b/lib/asn1/test/testUniqueObjectSets.erl index fd82087916..4d3ec94391 100644 --- a/lib/asn1/test/testUniqueObjectSets.erl +++ b/lib/asn1/test/testUniqueObjectSets.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/testValueTest.erl b/lib/asn1/test/testValueTest.erl index 1764323e93..6699c0094a 100644 --- a/lib/asn1/test/testValueTest.erl +++ b/lib/asn1/test/testValueTest.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2014. All Rights Reserved. +%% Copyright Ericsson AB 2014-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl index 8be3a29763..ac74470537 100644 --- a/lib/asn1/test/test_compile_options.erl +++ b/lib/asn1/test/test_compile_options.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2012. All Rights Reserved. +%% Copyright Ericsson AB 2005-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(test_compile_options). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -export([wrong_path/1,comp/2,path/1,ticket_6143/1,noobj/1, @@ -39,50 +39,49 @@ wrong_path(Config) -> end. comp(Parent,Config) -> - DataDir = ?config(data_dir,Config), - OutDir = ?config(priv_dir,Config), - ?line Err=asn1ct:compile(DataDir++"NoImport",[{i,OutDir},{i,filename:join([DataDir,"subdir"])},{outdir,OutDir}]), + DataDir = proplists:get_value(data_dir,Config), + OutDir = proplists:get_value(priv_dir,Config), + Err=asn1ct:compile(DataDir++"NoImport",[{i,OutDir},{i,filename:join([DataDir,"subdir"])},{outdir,OutDir}]), Parent!Err. %% OTP-5701 path(Config) -> - DataDir = ?config(data_dir,Config), - OutDir = ?config(priv_dir,Config), + DataDir = proplists:get_value(data_dir,Config), + OutDir = proplists:get_value(priv_dir,Config), {ok,CWD} = file:get_cwd(), - ?line file:set_cwd(filename:join([DataDir,subdir])), + file:set_cwd(filename:join([DataDir,subdir])), ok = asn1ct:compile("../MyMerge.set.asn",[{outdir,OutDir}]), - ?line ok=outfiles_check(OutDir), - ?line outfiles_remove(OutDir), + ok=outfiles_check(OutDir), + outfiles_remove(OutDir), file:set_cwd(filename:join([DataDir,subdir,subsubdir])), ok = asn1ct:compile('../../MyMerge.set.asn',[{i,'..'},{outdir,OutDir}]), - ?line ok=outfiles_check(OutDir,outfiles2()), + ok=outfiles_check(OutDir,outfiles2()), file:set_cwd(CWD), ok. ticket_6143(Config) -> asn1_test_lib:compile("AA1", Config, []). noobj(Config) -> - DataDir = ?config(data_dir,Config), - OutDir = ?config(priv_dir,Config), + DataDir = proplists:get_value(data_dir,Config), + OutDir = proplists:get_value(priv_dir,Config), code:purge('P-Record'), file:delete(filename:join([OutDir,'P-Record.erl'])), file:delete(filename:join([OutDir,'P-Record.beam'])), - ?line ok=asn1ct:compile(filename:join([DataDir,"P-Record"]), + ok=asn1ct:compile(filename:join([DataDir,"P-Record"]), [noobj,{outdir,OutDir}]), -% ?line false = code:is_loaded('P-Record'), - ?line {ok,_} = file:read_file_info(filename:join([OutDir, + {ok,_} = file:read_file_info(filename:join([OutDir, "P-Record.erl"])), - ?line {error,enoent} = + {error,enoent} = file:read_file_info(filename:join([OutDir,"P-Record.beam"])), - ?line {ok,_} = c:c(filename:join([OutDir,'P-Record']), + {ok,_} = c:c(filename:join([OutDir,'P-Record']), [{i,OutDir},{outdir,OutDir}]), - ?line {file,_} = code:is_loaded('P-Record'), + {file,_} = code:is_loaded('P-Record'), code:purge('P-Record'), code:delete('P-Record'), @@ -94,43 +93,41 @@ noobj(Config) -> file:delete(filename:join([OutDir,'p_record.beam'])), ok = asn1ct:compile(filename:join([DataDir,"p_record.set.asn"]), [asn1config,ber,noobj,{outdir,OutDir}]), -%% ?line false = code:is_loaded('P-Record'), -%% ?line false = code:is_loaded('p_record'), - ?line {error,enoent} = + {error,enoent} = file:read_file_info(filename:join([OutDir,"P-Record.beam"])), - ?line {error,enoent} = + {error,enoent} = file:read_file_info(filename:join([OutDir,"P-Record.erl"])), - ?line {error,enoent} = + {error,enoent} = file:read_file_info(filename:join([OutDir,"p_record.beam"])), io:format("read_file_info: p_record.erl~n",[]), - ?line {ok,_} = + {ok,_} = file:read_file_info(filename:join([OutDir,"p_record.erl"])), io:format("c:c: p_record.erl~n",[]), - ?line {ok,_} = c:c(filename:join([OutDir,'p_record']), + {ok,_} = c:c(filename:join([OutDir,'p_record']), [{i,OutDir},{outdir,OutDir}]), io:format("code:is_loaded: p_record.erl~n",[]), - ?line {file,_} = code:is_loaded('p_record'), + {file,_} = code:is_loaded('p_record'), io:format("file:delete: p_record.erl~n",[]), file:delete(filename:join([OutDir,'p_record.erl'])), file:delete(filename:join([OutDir,'p_record.beam'])). verbose(Config) when is_list(Config) -> - DataDir = ?config(data_dir,Config), - OutDir = ?config(priv_dir,Config), + DataDir = proplists:get_value(data_dir,Config), + OutDir = proplists:get_value(priv_dir,Config), Asn1File = filename:join([DataDir,"Comment.asn"]), %% Test verbose compile - ?line test_server:capture_start(), - ?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj,verbose]), - ?line test_server:capture_stop(), - ?line [Line0|_] = test_server:capture_get(), - ?line true = lists:prefix("Erlang ASN.1 compiler", Line0), + test_server:capture_start(), + ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj,verbose]), + test_server:capture_stop(), + [Line0|_] = test_server:capture_get(), + true = lists:prefix("Erlang ASN.1 compiler", Line0), %% Test non-verbose compile - ?line test_server:capture_start(), - ?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj]), - ?line test_server:capture_stop(), - ?line [] = test_server:capture_get(), + test_server:capture_start(), + ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj]), + test_server:capture_stop(), + [] = test_server:capture_get(), ok. outfiles_check(OutDir) -> @@ -141,7 +138,7 @@ outfiles_check(_OutDir,[])-> ok; outfiles_check(OutDir,[H|T]) -> io:format("File: ~p~n",[filename:join([OutDir,H])]), - ?line {ok,_}=file:read_file_info(filename:join([OutDir,H])), + {ok,_}=file:read_file_info(filename:join([OutDir,H])), outfiles_check(OutDir,T). outfiles1() -> @@ -155,8 +152,8 @@ outfiles_remove(OutDir) -> outfiles1()). record_name_prefix(Config) -> - DataDir = ?config(data_dir,Config), - OutDir = ?config(priv_dir,Config), + DataDir = proplists:get_value(data_dir,Config), + OutDir = proplists:get_value(priv_dir,Config), ok = b_SeqIn(DataDir,OutDir), ok = a_SeqIn(DataDir,OutDir). @@ -165,15 +162,15 @@ b_SeqIn(DataDir,OutDir) -> [{record_name_prefix,"b_"},{outdir,OutDir}]), io:format("FileName: ~p~nOutDir:~p~n", [filename:join([DataDir,'b_SeqIn']),OutDir]), - ?line {ok,_} = compile:file(filename:join([DataDir,'b_SeqIn']), + {ok,_} = compile:file(filename:join([DataDir,'b_SeqIn']), [{i,OutDir}]), - ?line 'b_SeqIn' = b_SeqIn:record_name(), + 'b_SeqIn' = b_SeqIn:record_name(), ok. a_SeqIn(DataDir,OutDir) -> asn1ct:compile(filename:join([DataDir,'Seq']), [{record_name_prefix,"a_"},{outdir,OutDir}]), - ?line {ok,_} = compile:file(filename:join([DataDir,'a_SeqIn']), + {ok,_} = compile:file(filename:join([DataDir,'a_SeqIn']), [{i,OutDir}]), - ?line 'a_SeqIn' = a_SeqIn:record_name(), + 'a_SeqIn' = a_SeqIn:record_name(), ok. diff --git a/lib/asn1/test/test_modified_x420.erl b/lib/asn1/test/test_modified_x420.erl index f9a29d1436..6cd9e0e33b 100644 --- a/lib/asn1/test/test_modified_x420.erl +++ b/lib/asn1/test/test_modified_x420.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ -module(test_modified_x420). -export([test/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test(Config) -> - DataDir = ?config(data_dir,Config), + DataDir = proplists:get_value(data_dir,Config), Der = read_pem(filename:join([DataDir,modified_x420,"p7_signed_data.pem"])), {ok,{_,_,SignedData}} = 'PKCS7':decode( 'ContentInfo', Der), diff --git a/lib/asn1/test/test_partial_incomplete_decode.erl b/lib/asn1/test/test_partial_incomplete_decode.erl index d5eacc5a4d..7c5cfab10a 100644 --- a/lib/asn1/test/test_partial_incomplete_decode.erl +++ b/lib/asn1/test/test_partial_incomplete_decode.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2012. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ -export([test/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test(Config) -> FMsg = msg('F'), @@ -67,7 +67,7 @@ test(Config) -> ok. test_megaco(Config) -> - DataDir = ?config(data_dir, Config), + DataDir = proplists:get_value(data_dir, Config), Files = filelib:wildcard(filename:join([DataDir,megacomessages,"*.val"])), Mod = 'MEDIA-GATEWAY-CONTROL', lists:foreach(fun(File) -> @@ -81,72 +81,72 @@ test_megaco(Config) -> exclusive_decode(Bin,F) -> Mod='MEDIA-GATEWAY-CONTROL', io:format("Encoding message: ~p~n",[F]), - ?line {ok,{_,_,{_,_VsnNo,{MsgMidKey,MsgMid},{MsgMBodyKey,MsgMBody}}}}= + {ok,{_,_,{_,_VsnNo,{MsgMidKey,MsgMid},{MsgMBodyKey,MsgMBody}}}}= Mod:decode_MegacoMessage_exclusive(Bin), - ?line {ok,_} = Mod:decode_part(MsgMidKey,MsgMid), - ?line {ok,_} = Mod:decode_part(MsgMBodyKey,MsgMBody), + {ok,_} = Mod:decode_part(MsgMidKey,MsgMid), + {ok,_} = Mod:decode_part(MsgMBodyKey,MsgMBody), ok. decode_parts('F',PartDecMsg) -> - ?line {fb,{'E',35,{NameE_b,ListBinE_b},false,{NameE_d,BinE_d}}} = PartDecMsg, - ?line {ok,[{'D',3,true}|_]} = 'PartialDecSeq':decode_part(NameE_b,ListBinE_b), - ?line {ok,{'D',3,true}} = 'PartialDecSeq':decode_part(NameE_b, + {fb,{'E',35,{NameE_b,ListBinE_b},false,{NameE_d,BinE_d}}} = PartDecMsg, + {ok,[{'D',3,true}|_]} = 'PartialDecSeq':decode_part(NameE_b,ListBinE_b), + {ok,{'D',3,true}} = 'PartialDecSeq':decode_part(NameE_b, hd(ListBinE_b)), - ?line {ok,{da,[{'A',16,{'D',17,true}}]}} = + {ok,{da,[{'A',16,{'D',17,true}}]}} = 'PartialDecSeq':decode_part(NameE_d,BinE_d), ok; decode_parts('F2',PartDecMsg) -> - ?line {fb,{'E',35,{E_bkey,E_b},false,{da,{E_d_akey,E_d_a}}}} = PartDecMsg, - ?line {ok,[{'D',3,true},{'D',4,false},{'D',5,true},{'D',6,true},{'D',7,false},{'D',8,true},{'D',9,true},{'D',10,false},{'D',11,true},{'D',12,true},{'D',13,false},{'D',14,true}]} = 'PartialDecSeq':decode_part(E_bkey,E_b), - ?line {ok,[{'A',16,{'D',17,true}}]} = 'PartialDecSeq':decode_part(E_d_akey,E_d_a); + {fb,{'E',35,{E_bkey,E_b},false,{da,{E_d_akey,E_d_a}}}} = PartDecMsg, + {ok,[{'D',3,true},{'D',4,false},{'D',5,true},{'D',6,true},{'D',7,false},{'D',8,true},{'D',9,true},{'D',10,false},{'D',11,true},{'D',12,true},{'D',13,false},{'D',14,true}]} = 'PartialDecSeq':decode_part(E_bkey,E_b), + {ok,[{'A',16,{'D',17,true}}]} = 'PartialDecSeq':decode_part(E_d_akey,E_d_a); decode_parts('F3',PartDecMsg) -> - ?line {fb,{'E',10,{E_bkey,E_b},false,{dc,{'E_d_dc',13,true,{E_d_dc_dcckey,E_d_dc_dcc}}}}} = PartDecMsg, - ?line {ok,[{'D',11,true},{'D',12,false}]} = 'PartialDecSeq':decode_part(E_bkey,E_b), - ?line {ok,{'E_d_dc_dcc',14,15}} = 'PartialDecSeq':decode_part(E_d_dc_dcckey,E_d_dc_dcc); + {fb,{'E',10,{E_bkey,E_b},false,{dc,{'E_d_dc',13,true,{E_d_dc_dcckey,E_d_dc_dcc}}}}} = PartDecMsg, + {ok,[{'D',11,true},{'D',12,false}]} = 'PartialDecSeq':decode_part(E_bkey,E_b), + {ok,{'E_d_dc_dcc',14,15}} = 'PartialDecSeq':decode_part(E_d_dc_dcckey,E_d_dc_dcc); decode_parts('D',PartDecMsg) -> - ?line {'D',{NameD_a,BinD_a},true} = PartDecMsg, - ?line {ok,123} = 'PartialDecSeq':decode_part(NameD_a,BinD_a), + {'D',{NameD_a,BinD_a},true} = PartDecMsg, + {ok,123} = 'PartialDecSeq':decode_part(NameD_a,BinD_a), ok; decode_parts('A',PartDecMsg) -> - ?line {'A',12,{c,{'S',true,false}},{b,{NameA_c_b,BinA_c_b}}} = PartDecMsg, - ?line {ok,{'A_c_b',false,false}} = + {'A',12,{c,{'S',true,false}},{b,{NameA_c_b,BinA_c_b}}} = PartDecMsg, + {ok,{'A_c_b',false,false}} = 'PartialDecSeq2':decode_part(NameA_c_b,BinA_c_b), ok; decode_parts('GetRequest',PartDecMsg) -> - ?line {'GetRequest',true,false, + {'GetRequest',true,false, {'AcceptTypes',[html,'plain-text',gif,jpeg], {NameAcceptTypes_others,ListBinAcceptTypes_others}}, "IamfineThankYOu"} = PartDecMsg, - ?line {ok,["hell","othe","reho","peyo","uare","fine"]} = + {ok,["hell","othe","reho","peyo","uare","fine"]} = 'PartialDecMyHTTP':decode_part(NameAcceptTypes_others, ListBinAcceptTypes_others), - ?line {ok,"hell"} = + {ok,"hell"} = 'PartialDecMyHTTP':decode_part(NameAcceptTypes_others, hd(ListBinAcceptTypes_others)), ok; decode_parts('S1_1',PartDecMsg) -> - ?line {'S1',14,{'S2',false,12,{NameS2c,BinS2c}}, + {'S1',14,{'S2',false,12,{NameS2c,BinS2c}}, {_,{NameS1c_a,ListBinS1c_a}},{NameS1d,BinS1d}} = PartDecMsg, - ?line {ok,[{'S3',10,"PrintableString","OCTETSTRING", + {ok,[{'S3',10,"PrintableString","OCTETSTRING", [one,two,three,four]}|_Rest1]} = 'PartialDecSeq3':decode_part(NameS2c,BinS2c), - ?line {ok,[{'S3',10,"PrintableString","OCTETSTRING", + {ok,[{'S3',10,"PrintableString","OCTETSTRING", [one,two,three,four]}|_Rest2]} = 'PartialDecSeq3':decode_part(NameS1c_a,ListBinS1c_a), - ?line {ok,{'S3',10,"PrintableString","OCTETSTRING", + {ok,{'S3',10,"PrintableString","OCTETSTRING", [one,two,three,four]}} = 'PartialDecSeq3':decode_part(NameS1c_a,hd(ListBinS1c_a)), - ?line {ok,[{'Name',"Hans","HCA","Andersen"}|_Rest3]} = + {ok,[{'Name',"Hans","HCA","Andersen"}|_Rest3]} = 'PartialDecSeq3':decode_part(NameS1d,BinS1d), ok; decode_parts('S1_2',PartDecMsg) -> - ?line {'S1',14,{'S2',false,12,_S2c},S1c_b,{NameS1d,BinS1d}} = PartDecMsg, - ?line {b,{'C1_b',11,true, + {'S1',14,{'S2',false,12,_S2c},S1c_b,{NameS1d,BinS1d}} = PartDecMsg, + {b,{'C1_b',11,true, {'S4',{'Name',"Hans","HCA","Andersen"},"MSc"}}}=S1c_b, - ?line {ok,[{'Name',"Hans","HCA","Andersen"}|_Rest3]} = + {ok,[{'Name',"Hans","HCA","Andersen"}|_Rest3]} = 'PartialDecSeq3':decode_part(NameS1d,BinS1d), ok. diff --git a/lib/asn1/test/test_selective_decode.erl b/lib/asn1/test/test_selective_decode.erl index 079351db19..c264e919a6 100644 --- a/lib/asn1/test/test_selective_decode.erl +++ b/lib/asn1/test/test_selective_decode.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2012. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(test_selective_decode). -export([test/0]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). test() -> FMsg = msg('F'), diff --git a/lib/asn1/test/test_special_decode_performance.erl b/lib/asn1/test/test_special_decode_performance.erl index 7bb324c902..35c396575b 100644 --- a/lib/asn1/test/test_special_decode_performance.erl +++ b/lib/asn1/test/test_special_decode_performance.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2012. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,34 +22,34 @@ -export([go/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). go(all) -> {Time_S_s,Time_S_e,Time_S_c}=go(10000,'PartialDecSeq'), {Time_MGC_s,Time_MGC_e,Time_MGC_c}=go(10000,'MEDIA-GATEWAY-CONTROL'), - ?line do_comment({Time_S_s,Time_MGC_s}, + do_comment({Time_S_s,Time_MGC_s}, {Time_S_e,Time_MGC_e}, {Time_S_c,Time_MGC_c}). go(N,Mod) -> {Type,Val} = val(Mod), {ok,B} = Mod:encode(Type, Val), - ?line go(Mod,B,N). + go(Mod,B,N). go(Mod,Bin,N) -> - ?line FsS = get_selective_funcs(Mod), - ?line FsE = get_exclusive_funcs(Mod), - ?line io:format("~nSize of value for module ~p: ~p bytes.~n~n",[Mod,size(Bin)]), - ?line Time_s=go1(selective,Mod,FsS,Bin,N,0), - ?line Time_e=go1(exclusive,Mod,FsE,Bin,N,0), - ?line Time_c=go1(common,Mod,[decode],Bin,N,0), - ?line {Time_s/length(FsS),Time_e/length(FsE),Time_c}. + FsS = get_selective_funcs(Mod), + FsE = get_exclusive_funcs(Mod), + io:format("~nSize of value for module ~p: ~p bytes.~n~n",[Mod,size(Bin)]), + Time_s=go1(selective,Mod,FsS,Bin,N,0), + Time_e=go1(exclusive,Mod,FsE,Bin,N,0), + Time_c=go1(common,Mod,[decode],Bin,N,0), + {Time_s/length(FsS),Time_e/length(FsE),Time_c}. go1(_,_,[],_,_,AccTime) -> - ?line AccTime; + AccTime; %% go1 for common decode go1(common,Mod,_,Bin,N,_) -> - ?line TT=get_top_type(Mod), + TT=get_top_type(Mod), {Time,Result} = timer:tc(fun() -> loop1(Mod, decode, TT, Bin, N) end), case Result of {ok,_R1} -> diff --git a/lib/asn1/test/test_undecoded_rest.erl b/lib/asn1/test/test_undecoded_rest.erl index 6264530fff..f70953330b 100644 --- a/lib/asn1/test/test_undecoded_rest.erl +++ b/lib/asn1/test/test_undecoded_rest.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -22,14 +22,14 @@ -export([test/2]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). %% testing OTP-5104 test(Opts, Config) -> {ok,Msg} = asn1ct:value('P-Record', 'PersonnelRecord', - [{i,?config(case_dir, Config)}]), + [{i,proplists:get_value(case_dir, Config)}]), Bytes0 = encode(Opts, 'PersonnelRecord', Msg), Bytes1 = iolist_to_binary([Bytes0, <<55,55,55>>]), case proplists:get_bool(undec_rest, Opts) of diff --git a/lib/asn1/test/test_x691.erl b/lib/asn1/test/test_x691.erl index 56c1b9bf71..878304d94f 100644 --- a/lib/asn1/test/test_x691.erl +++ b/lib/asn1/test/test_x691.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ -module(test_x691). -export([cases/1]). --include_lib("test_server/include/test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). cases(Erule) -> _ = [begin diff --git a/lib/asn1/vsn.mk b/lib/asn1/vsn.mk index ab2c127ca2..e4bf3e2236 100644 --- a/lib/asn1/vsn.mk +++ b/lib/asn1/vsn.mk @@ -1 +1 @@ -ASN1_VSN = 4.0.2 +ASN1_VSN = 4.0.4 |