diff options
Diffstat (limited to 'lib/sasl/test')
40 files changed, 263 insertions, 205 deletions
diff --git a/lib/sasl/test/rb_SUITE.erl b/lib/sasl/test/rb_SUITE.erl index 35a4eb7e7b..453f992850 100644 --- a/lib/sasl/test/rb_SUITE.erl +++ b/lib/sasl/test/rb_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -66,23 +66,31 @@ init_per_group(running_error_logger,Config) -> restart_sasl(), Config. -end_per_group(running_error_logger,Config) -> +end_per_group(running_error_logger,_Config) -> %% Remove log_mf_h??? ok. init_per_testcase(_Case,Config) -> case whereis(?SUP) of - undefined -> ok; - Pid -> kill(Pid) + undefined -> + ok; + Sup -> + Server = whereis(?MODULE), + exit(Sup,kill), + wait_for_down([Server,Sup]) end, empty_error_logs(Config), Config. -kill(Pid) -> +wait_for_down([]) -> + ok; +wait_for_down([undefined|Rest]) -> + wait_for_down(Rest); +wait_for_down([Pid|Rest]) -> Ref = erlang:monitor(process,Pid), - exit(Pid,kill), - receive {'DOWN', Ref, process, Pid, _Info} -> ok end. + receive {'DOWN', Ref, process, Pid, _Info} -> ok end, + wait_for_down(Rest). end_per_testcase(Case,Config) -> try apply(?MODULE,Case,[cleanup,Config]) @@ -96,8 +104,9 @@ end_per_testcase(Case,Config) -> help(_Config) -> Help = capture(fun() -> rb:h() end), - "Report Browser Tool - usage" = hd(Help), - "rb:stop - stop the rb_server" = lists:last(Help), + %% Check that first and last line is there + true = lists:member("Report Browser Tool - usage", Help), + true = lists:member("rb:stop - stop the rb_server", Help), ok. %% Test that all three sasl env vars must be set for a successful start of rb @@ -353,18 +362,48 @@ start_stop_log(Config) -> StdioResult = [_|_] = capture(fun() -> rb:show(1) end), {ok,<<>>} = file:read_file(OutFile), - %% Start log and check that show is printed to log and not to standad_io + %% Start log and check that show is printed to log and not to standard_io ok = rb:start_log(OutFile), [] = capture(fun() -> rb:show(1) end), {ok,Bin} = file:read_file(OutFile), true = (Bin =/= <<>>), + %% Start log with atom standard_io and check that show is printed to standard_io + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + ok = rb:start_log(standard_io), + StdioResult = [_|_] = capture(fun() -> rb:show(1) end), + {ok,<<>>} = file:read_file(OutFile), + + %% Start log and check that show is printed to iodevice log and not to standard_io + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + {ok, IoOutFile} = file:open(OutFile,[write]), + ok = rb:start_log(IoOutFile), + [] = capture(fun() -> rb:show(1) end), + {ok,Bin} = file:read_file(OutFile), + true = (Bin =/= <<>>), + ok = file:close(IoOutFile), + %% Stop log and check that show is printed to standard_io and not to log ok = rb:stop_log(), ok = file:write_file(OutFile,[]), StdioResult = capture(fun() -> rb:show(1) end), {ok,<<>>} = file:read_file(OutFile), + %% Start log and check that list is printed to log and not to standard_io + ok = file:write_file(OutFile,[]), + ok = rb:start_log(OutFile), + [] = capture(fun() -> rb:log_list() end), + {ok,Bin2} = file:read_file(OutFile), + true = (Bin2 =/= <<>>), + + %% Stop log and check that list is printed to standard_io and not to log + ok = rb:stop_log(), + ok = file:write_file(OutFile,[]), + StdioResult2 = capture(fun() -> rb:log_list() end), + {ok,<<>>} = file:read_file(OutFile), + %% Test that standard_io is used if log file can not be opened ok = rb:start_log(filename:join(nonexistingdir,"newfile.txt")), StdioResult = capture(fun() -> rb:show(1) end), diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index a8e3cc3d88..a56924d5ca 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2012. All Rights Reserved. +%% Copyright Ericsson AB 2011-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -63,7 +63,8 @@ cases() -> instructions, eval_appup, eval_appup_with_restart, supervisor_which_children_timeout, release_handler_which_releases, install_release_syntax_check, - upgrade_supervisor, upgrade_supervisor_fail, otp_9864]. + upgrade_supervisor, upgrade_supervisor_fail, otp_9864, + otp_10463_upgrade_script_regexp]. groups() -> [{release,[], @@ -937,7 +938,7 @@ otp_9417(cleanup,_Conf) -> %% OTP-9395 - performance problems when there are MANY processes %% Test that the procedure of checking for old code before an upgrade -%% can be started is "very much faster" when there is no old code in +%% can be started is faster when there is no old code in %% the system. otp_9395_check_old_code(Conf) when is_list(Conf) -> @@ -977,8 +978,8 @@ otp_9395_check_old_code(Conf) when is_list(Conf) -> "\tAfter purge: ~.2f sec~n" "\tT1/T2: ~.2f", [NProcs,length(Modules),T1/1000000,T2/1000000,X]), - if X < 1000 -> - ct:fail({not_enough_improvement_after_purge,round(X)}); + if X < 1 -> + ct:fail({no_improvement_after_purge,X}); true -> ok end; @@ -1093,9 +1094,11 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) -> [RelVsn2, filename:join(Rel2Dir, "sys.config")]), %% First, install release directly and check how much time it takes + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst0,{ok, _, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), - ct:log("install_release: ~.2f",[TInst0/1000000]), + SWT0 = rpc:call(Node,erlang,statistics,[scheduler_wall_time]), +% ct:log("install_release: ~.2f",[TInst0/1000000]), %% Restore to old release, spawn processes again and load to get old code {_,RelVsn1} = init:script_id(), @@ -1109,18 +1112,35 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) -> true = rpc:call(Node,erlang,check_old_code,[m10]), %% Run check_install_release with purge before install this time - {TCheck,{ok, _RelVsn1, []}} = + {_TCheck,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, check_install_release, [RelVsn2,[purge]]]), - ct:log("check_install_release with purge: ~.2f",[TCheck/1000000]), +% ct:log("check_install_release with purge: ~.2f",[_TCheck/1000000]), %% Finally install release after check and purge, and check that %% this install was faster than the first. + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]), + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst2,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), - ct:log("install_release: ~.2f",[TInst2/1000000]), - - true = (TInst2 < TInst0), + SWT2 = rpc:call(Node,erlang,statistics,[scheduler_wall_time]), +% ct:log("install_release: ~.2f",[TInst2/1000000]), + + %% Calculate and print real time and CPU utilization + SumFun = fun({_,A,T},{AAcc,TAcc}) -> {A+AAcc,T+TAcc} end, + {SumA0,SumT0} = lists:foldl(SumFun,{0,0},SWT0), + {SumA2,SumT2} = lists:foldl(SumFun,{0,0},SWT2), + TI0=TInst0/1000000, + TI2=TInst2/1000000, + CPU0=SumA0/SumT0, + CPU2=SumA2/SumT2, + X0 = TI0*CPU0, + X2 = TI2*CPU2, + ct:log("First run: T=~.2fsec, CPU=~.2f, T*CPU=~.2f~n" + "Second run: T=~.2fsec, CPU=~.2f, T*CPU=~.2f~n", + [TI0, CPU0, X0, TI2, CPU2, X2]), + + true = (X2 =< X0), % disregarding wait time for file access etc. ok. @@ -1171,9 +1191,11 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) -> [RelVsn2, filename:join(Rel2Dir, "sys.config")]), %% First, install release directly and check how much time it takes + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst0,{ok, _, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), - ct:log("install_release: ~.2f",[TInst0/1000000]), + SWT0 = rpc:call(Node,erlang,statistics,[scheduler_wall_time]), +% ct:log("install_release: ~.2f",[TInst0/1000000]), %% Restore to old release, spawn processes again and load to get old code {_,RelVsn1} = init:script_id(), @@ -1187,18 +1209,35 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) -> true = rpc:call(Node,erlang,check_old_code,[m10]), %% Run check_install_release with purge before install this time - {TCheck,{ok, _RelVsn1, []}} = + {_TCheck,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, check_install_release, [RelVsn2,[purge]]]), - ct:log("check_install_release with purge: ~.2f",[TCheck/1000000]), +% ct:log("check_install_release with purge: ~.2f",[_TCheck/1000000]), %% Finally install release after check and purge, and check that %% this install was faster than the first. + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]), + rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]), {TInst2,{ok, _RelVsn1, []}} = timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]), - ct:log("install_release: ~.2f",[TInst2/1000000]), - - true = (TInst2 =< TInst0), + SWT2 = rpc:call(Node,erlang,statistics,[scheduler_wall_time]), +% ct:log("install_release: ~.2f",[TInst2/1000000]), + + %% Calculate and print real time and CPU utilization + SumFun = fun({_,A,T},{AAcc,TAcc}) -> {A+AAcc,T+TAcc} end, + {SumA0,SumT0} = lists:foldl(SumFun,{0,0},SWT0), + {SumA2,SumT2} = lists:foldl(SumFun,{0,0},SWT2), + TI0=TInst0/1000000, + TI2=TInst2/1000000, + CPU0=SumA0/SumT0, + CPU2=SumA2/SumT2, + X0 = TI0*CPU0, + X2 = TI2*CPU2, + ct:log("First run: T=~.2fsec, CPU=~.2f, T*CPU=~.2f~n" + "Second run: T=~.2fsec, CPU=~.2f, T*CPU=~.2f~n", + [TI0, CPU0, X0, TI2, CPU2, X2]), + + true = (X2 =< X0), % disregarding wait time for file access etc. ok. @@ -1206,12 +1245,25 @@ otp_9395_rm_many_mods(cleanup,_Conf) -> stop_node(node_name(otp_9395_rm_many_mods)). otp_9864(Conf) -> + case os:type() of + {win32,_} -> + {skip,"Testing handling of symlinks - skipped on windows"}; + _ -> + do_otp_9864(Conf) + end. +do_otp_9864(Conf) -> %% Set some paths PrivDir = priv_dir(Conf), Dir = filename:join(PrivDir,"otp_9864"), RelDir = filename:join(?config(data_dir, Conf), "app1_app2"), - LibDir1 = filename:join(RelDir, "lib1"), - LibDir2 = filename:join(RelDir, "lib2"), + + %% Copy libs to priv_dir because remove_release will remove some + %% of these again, and we don't want to remove anything from + %% data_dir + copy_tree(Conf,filename:join(RelDir, "lib1"),Dir), + copy_tree(Conf,filename:join(RelDir, "lib2"),Dir), + LibDir1 = filename:join(Dir, "lib1"), + LibDir2 = filename:join(Dir, "lib2"), %% Create the releases Rel1 = create_and_install_fake_first_release(Dir, @@ -1229,10 +1281,6 @@ otp_9864(Conf) -> {ok, Node} = t_start_node(otp_9864, Rel1, filename:join(Rel1Dir,"sys.config")), %% Unpack rel2 (make sure it does not work if an AppDir is bad) - LibDir3 = filename:join(RelDir, "lib3"), - {error, {no_such_directory, _}} = - rpc:call(Node, release_handler, set_unpacked, - [Rel2++".rel", [{app1,"2.0",LibDir2}, {app2,"1.0",LibDir3}]]), {ok, RelVsn2} = rpc:call(Node, release_handler, set_unpacked, [Rel2++".rel", [{app1,"2.0",LibDir2}, {app2,"1.0",LibDir2}]]), @@ -1243,22 +1291,27 @@ otp_9864(Conf) -> ok = rpc:call(Node, release_handler, install_file, [RelVsn2, filename:join(Rel2Dir, "sys.config")]), - %% Install RelVsn2 without {update_paths, true} option + %% Install RelVsn2 {ok, RelVsn1, []} = rpc:call(Node, release_handler, install_release, [RelVsn2]), - %% Install RelVsn1 again + %% Create a symlink inside release 2 + Releases2Dir = filename:join([Dir,"releases","2"]), + Link = filename:join(Releases2Dir,"foo_symlink_dir"), + file:make_symlink(Releases2Dir,Link), + + %% Back down to RelVsn1 {ok, RelVsn1, []} = rpc:call(Node, release_handler, install_release, [RelVsn1]), - TempRel2Dir = filename:join(Dir,"releases/2"), - file:make_symlink(TempRel2Dir, filename:join(TempRel2Dir, "foo_symlink_dir")), - %% This will fail if symlinks are not handled ok = rpc:call(Node, release_handler, remove_release, [RelVsn2]), ok. +otp_9864(cleanup,_Conf) -> + stop_node(node_name(otp_9864)). + upgrade_supervisor(Conf) when is_list(Conf) -> %% Set some paths @@ -1646,6 +1699,15 @@ upgrade_gg(cleanup,Config) -> ok = stop_nodes(NodeNames). +%%%----------------------------------------------------------------- +%%% OTP-10463, Bug - release_handler could not handle regexp in appup +%%% files. +otp_10463_upgrade_script_regexp(_Config) -> + %% Assuming that kernel always has a regexp in it's appup + KernelVsn = vsn(kernel,current), + {ok,KernelVsn,_} = + release_handler:upgrade_script(kernel,code:lib_dir(kernel)), + ok. %%%================================================================= diff --git a/lib/sasl/test/release_handler_SUITE_data/Makefile.src b/lib/sasl/test/release_handler_SUITE_data/Makefile.src index 55d20aa8b6..b794aa0e6f 100644 --- a/lib/sasl/test/release_handler_SUITE_data/Makefile.src +++ b/lib/sasl/test/release_handler_SUITE_data/Makefile.src @@ -1,9 +1,5 @@ EFLAGS=+debug_info -P2B= \ - P2B/a-2.0/ebin/a.@EMULATOR@ \ - P2B/a-2.0/ebin/a_sup.@EMULATOR@ - LIB= \ lib/a-9.1/ebin/a.@EMULATOR@ \ lib/a-9.1/ebin/a_sup.@EMULATOR@ \ @@ -80,13 +76,7 @@ SUP= \ release_handler_timeouts/dummy-0.1/ebin/dummy_sup.@EMULATOR@ \ release_handler_timeouts/dummy-0.1/ebin/dummy_sup_2.@EMULATOR@ -all: $(P2B) $(LIB) $(APP) $(OTP2740) $(C) $(SUP) - -P2B/a-2.0/ebin/a.@EMULATOR@: P2B/a-2.0/src/a.erl - erlc $(EFLAGS) -oP2B/a-2.0/ebin P2B/a-2.0/src/a.erl -P2B/a-2.0/ebin/a_sup.@EMULATOR@: P2B/a-2.0/src/a_sup.erl - erlc $(EFLAGS) -oP2B/a-2.0/ebin P2B/a-2.0/src/a_sup.erl - +all: $(LIB) $(APP) $(OTP2740) $(C) $(SUP) lib/a-1.0/ebin/a.@EMULATOR@: lib/a-1.0/src/a.erl erlc $(EFLAGS) -olib/a-1.0/ebin lib/a-1.0/src/a.erl diff --git a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/ebin/a.app b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/ebin/a.app deleted file mode 100644 index 200cfcfe47..0000000000 --- a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/ebin/a.app +++ /dev/null @@ -1,8 +0,0 @@ -{application, a, - [{description, "A CXC 138 11"}, - {vsn, "2.0"}, - {modules, [{a, 1}, {a_sup,1}]}, - {registered, [a_sup]}, - {applications, [kernel, stdlib]}, - {env, [{key1, val1}]}, - {mod, {a_sup, []}}]}. diff --git a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl deleted file mode 100644 index cfe38b55ce..0000000000 --- a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl +++ /dev/null @@ -1,47 +0,0 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. -%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings -%% AB. All Rights Reserved.'' -%% -%% $Id$ -%% --module(a). - - --behaviour(gen_server). - -%% External exports --export([start_link/0, a/0]). -%% Internal exports --export([init/1, handle_call/3, handle_info/2, terminate/2]). - -start_link() -> gen_server:start_link({local, aa}, a, [], []). - -a() -> gen_server:call(aa, a). - -%%----------------------------------------------------------------- -%% Callback functions from gen_server -%%----------------------------------------------------------------- -init([]) -> - process_flag(trap_exit, true), - {ok, state}. - -handle_call(a, _From, State) -> - X = application:get_all_env(a), - {reply, X, State}. - -handle_info(_, State) -> - {noreply, State}. - -terminate(_Reason, _State) -> - ok. diff --git a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl deleted file mode 100644 index a141c1767b..0000000000 --- a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl +++ /dev/null @@ -1,37 +0,0 @@ -%% ``The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved via the world wide web at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. -%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings -%% AB. All Rights Reserved.'' -%% -%% $Id$ -%% --module(a_sup). - - --behaviour(supervisor). - -%% External exports --export([start/2]). - -%% Internal exports --export([init/1]). - -start(_, _) -> - supervisor:start_link({local, a_sup}, a_sup, []). - -init([]) -> - SupFlags = {one_for_one, 4, 3600}, - Config = {a, - {a, start_link, []}, - permanent, 2000, worker, [a]}, - {ok, {SupFlags, [Config]}}. diff --git a/lib/sasl/test/release_handler_SUITE_data/c/c.app b/lib/sasl/test/release_handler_SUITE_data/c/c.app index 908a94cf2d..2f56196918 100644 --- a/lib/sasl/test/release_handler_SUITE_data/c/c.app +++ b/lib/sasl/test/release_handler_SUITE_data/c/c.app @@ -1,7 +1,7 @@ {application, c, [{description, "C CXC 138 11"}, {vsn, "1.0"}, - {modules, [b, {aa, 1}, {c_sup,1}]}, + {modules, [b, aa, c_sup]}, {registered, [cc,bb,c_sup]}, {applications, [kernel, stdlib]}, {env, [{key1, val1}]}, diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/ebin/a.app b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/ebin/a.app index e938137f67..7ae189a36a 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/ebin/a.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.0/ebin/a.app @@ -1,7 +1,7 @@ {application, a, [{description, "A CXC 138 11"}, {vsn, "1.0"}, - {modules, [{a, 1}, {a_sup,1}]}, + {modules, [a, a_sup]}, {registered, [a_sup]}, {applications, [kernel, stdlib]}, {env, [{key1, val1}]}, diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/ebin/a.app b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/ebin/a.app index 1c3053b2fa..f8ab31fab9 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/ebin/a.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.1/ebin/a.app @@ -1,7 +1,7 @@ {application, a, [{description, "A CXC 138 11"}, {vsn, "1.1"}, - {modules, [{a, 2}, {a_sup,1}]}, + {modules, [a, a_sup]}, {registered, [a_sup]}, {applications, [kernel, stdlib]}, {env, [{key1, val1}]}, diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/ebin/a.app b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/ebin/a.app index b38722f06d..2393af0493 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/ebin/a.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/a-1.2/ebin/a.app @@ -1,7 +1,7 @@ {application, a, [{description, "A CXC 138 11"}, {vsn, "1.2"}, - {modules, [{a, 2}, {a_sup,1}]}, + {modules, [a, a_sup]}, {registered, [a_sup]}, {applications, [kernel, stdlib]}, {env, [{key1, val1}]}, diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/b-1.0/ebin/b.app b/lib/sasl/test/release_handler_SUITE_data/lib/b-1.0/ebin/b.app index 00347b2754..e2eada00a4 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/b-1.0/ebin/b.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/b-1.0/ebin/b.app @@ -2,6 +2,6 @@ {application, b, [{description, "B CXC 138 12"}, {vsn, "1.0"}, - {modules, [{b_server, 1},{b_lib, 1}]}, + {modules, [b_server,b_lib]}, {registered, [b_server]}, {applications, [kernel, stdlib]}]}. diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.app b/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.app index 73c8e42b32..e4f8369ae5 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/b-2.0/ebin/b.app @@ -2,6 +2,6 @@ {application, b, [{description, "B CXC 138 12"}, {vsn, "2.0"}, - {modules, [{b_server, 1}]}, + {modules, [b_server]}, {registered, [b_server]}, {applications, [kernel, stdlib]}]}. diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.0/ebin/many_mods.app b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.0/ebin/many_mods.app index aa39adfffa..5c56c4cd74 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.0/ebin/many_mods.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.0/ebin/many_mods.app @@ -2,16 +2,6 @@ {application, many_mods, [{description, "Application with many modules CXC 138 11"}, {vsn, "1.0"}, - {modules, [{m, 1}, - {m1,1}, - {m2,1}, - {m3,1}, - {m4,1}, - {m5,1}, - {m6,1}, - {m7,1}, - {m8,1}, - {m9,1}, - {m10,1}]}, + {modules, [m,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10]}, {registered, []}, {applications, [kernel, stdlib]}]}. diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.1/ebin/many_mods.app b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.1/ebin/many_mods.app index 36c50caf2f..87fdfe8442 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.1/ebin/many_mods.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-1.1/ebin/many_mods.app @@ -2,16 +2,6 @@ {application, many_mods, [{description, "Application with many modules CXC 138 11"}, {vsn, "1.1"}, - {modules, [{m, 1}, - {m1,1}, - {m2,1}, - {m3,1}, - {m4,1}, - {m5,1}, - {m6,1}, - {m7,1}, - {m8,1}, - {m9,1}, - {m10,1}]}, + {modules, [m,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10]}, {registered, []}, {applications, [kernel, stdlib]}]}. diff --git a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-2.0/ebin/many_mods.app b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-2.0/ebin/many_mods.app index 98f6527750..aba906d667 100644 --- a/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-2.0/ebin/many_mods.app +++ b/lib/sasl/test/release_handler_SUITE_data/lib/many_mods-2.0/ebin/many_mods.app @@ -2,6 +2,6 @@ {application, many_mods, [{description, "Application with many modules CXC 138 11"}, {vsn, "2.0"}, - {modules, [{m, 1}]}, + {modules, [m]}, {registered, []}, {applications, [kernel, stdlib]}]}. diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl index 878d582e6b..3921b2d3bb 100644 --- a/lib/sasl/test/systools_SUITE.erl +++ b/lib/sasl/test/systools_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2012. All Rights Reserved. +%% Copyright Ericsson AB 2012-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -40,7 +40,8 @@ -export([all/0,suite/0,groups/0,init_per_group/2,end_per_group/2]). --export([script_options/1, normal_script/1, no_mod_vsn_script/1, +-export([script_options/1, normal_script/1, unicode_script/1, + unicode_script/2, no_mod_vsn_script/1, wildcard_script/1, variable_script/1, no_sasl_script/1, abnormal_script/1, src_tests_script/1, crazy_script/1, included_script/1, included_override_script/1, @@ -58,6 +59,7 @@ -export([otp_6226_outdir/1]). -export([init_per_suite/1, end_per_suite/1, init_per_testcase/2, end_per_testcase/2]). +-export([delete_tree/1]). -import(lists, [foldl/3]). @@ -75,7 +77,7 @@ all() -> groups() -> [{script, [], - [script_options, normal_script, no_mod_vsn_script, + [script_options, normal_script, unicode_script, no_mod_vsn_script, wildcard_script, variable_script, abnormal_script, no_sasl_script, src_tests_script, crazy_script, included_script, included_override_script, @@ -250,6 +252,67 @@ normal_script(Config) when is_list(Config) -> ok. +%% make_script: Test make_script with unicode .app file +unicode_script(Config) when is_list(Config) -> + UnicodeStr = [945,946], % alhpa beta in greek letters + + {LatestDir, LatestName} = create_script({unicode,UnicodeStr},Config), + + DataDir = filename:absname(?copydir), + UnicodeApp = fname([DataDir, "d_unicode", "lib", "ua-1.0"]), + TarFile = fname(?privdir, "unicode_app.tgz"), + {ok, Tar} = erl_tar:open(TarFile, [write, compressed]), + ok = erl_tar:add(Tar, UnicodeApp, "ua-1.0", [compressed]), + ok = erl_tar:close(Tar), + + UnicodeLibDir = fname([DataDir, "d_unicode", UnicodeStr]), + P1 = fname([UnicodeLibDir, "ua-1.0", "ebin"]), + + %% Need to do this on a separate node to make sure it has unicode + %% filename mode (+fnu*) + {ok,HostStr} = inet:gethostname(), + Host = list_to_atom(HostStr), + {ok,Node} = ct_slave:start(Host,unicode_script_node,[{erl_flags,"+fnui"}]), + + ok = rpc:call(Node,erl_tar,extract, + [TarFile, [{cwd,UnicodeLibDir},compressed]]), + + true = rpc:call(Node,code,add_patha,[P1]), + + ok = rpc:call(Node,file,set_cwd,[LatestDir]), + + ok = rpc:call(Node,systools,make_script,[filename:basename(LatestName), + [local]]), + + {ok, Script} = rpc:call(Node,file,consult,[LatestName++".script"]), + + %% For debug purpose - print script to log + io:format("~tp~n",[Script]), + + %% check that script contains unicode strings in + %% 1. release version (set in ?MODULE:do_create_script) + [{script,{"Test release",UnicodeStr},Instr}] = Script, + + %% 2. application description (set in ua.app in data dir) + [AppInfo] = [X || {apply,{application,load,[{application,ua,X}]}} <- Instr], + {description,UnicodeStr} = lists:keyfind(description,1,AppInfo), + + %% 3. path (directory name where unicode_app.tgz is extracted) + true = lists:member({path,[P1]},Instr), + + %% If all is good, delete the unicode dir to avoid lingering files + %% on windows. + rpc:call(Node,code,add_pathz,[filename:dirname(code:which(?MODULE))]), + rpc:call(Node,?MODULE,delete_tree,[UnicodeLibDir]), + + ok. + +unicode_script(cleanup,Config) -> + _ = ct_slave:stop(unicode_script_node), + file:delete(fname(?privdir, "unicode_app.tgz")), + ok. + + %% make_script: %% Modules specified without version in .app file (db-3.1). %% Note that this is now the normal way - i.e. systools now ignores @@ -2090,15 +2153,20 @@ create_script(current_all_future_erts,Config) -> do_create_script(current_all_future_erts,Config,"99.99",Apps); create_script(current_all_future_sasl,Config) -> Apps = [{kernel,current},{stdlib,current},{sasl,"9.9"},{db,"2.1"},{fe,"3.1"}], - do_create_script(current_all_future_sasl,Config,current,Apps). + do_create_script(current_all_future_sasl,Config,current,Apps); +create_script({unicode,RelVsn},Config) -> + Apps = core_apps(current) ++ [{ua,"1.0"}], + do_create_script(unicode,RelVsn,Config,current,Apps). do_create_script(Id,Config,ErtsVsn,AppVsns) -> + do_create_script(Id,string:to_upper(atom_to_list(Id)),Config,ErtsVsn,AppVsns). +do_create_script(Id,RelVsn,Config,ErtsVsn,AppVsns) -> PrivDir = ?privdir, Name = fname(PrivDir, Id), {ok,Fd} = file:open(Name++".rel",write), RelfileContent = - {release,{"Test release", string:to_upper(atom_to_list(Id))}, + {release,{"Test release", RelVsn}, {erts,erts_vsn(ErtsVsn)}, app_vsns(AppVsns)}, io:format(Fd,"~p.~n",[RelfileContent]), diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/db-2.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/db-2.1/ebin/db.app index d375768b99..0878b80cb5 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/db-2.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/db-2.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "2.0"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/fe-3.1/ebin/fe.app index d3bd85cda6..33d44805bd 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_app_vsn/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-2.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-2.1/ebin/fe.app index 3cb0b0c2cf..d7fae9e092 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-2.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-2.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-3.1/ebin/fe.app index 0696e2494c..682d40eb12 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_appup/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/db-2.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/db-2.1/ebin/db.app index 191919f8d3..a1025c306a 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/db-2.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/db-2.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "2.1"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/fe-3.1/ebin/fe.app index d3bd85cda6..33d44805bd 100644 --- a/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_bad_mod+warn/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_links/lib/db-2.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_links/lib/db-2.1/ebin/db.app index 3e0ac3c3c9..28d0f80d34 100644 --- a/lib/sasl/test/systools_SUITE_data/d_links/lib/db-2.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_links/lib/db-2.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "2.1"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}, {db3, "2.0"}]}, + {modules, [db1, db2, db3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/db-2.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/db-2.1/ebin/db.app index 191919f8d3..a1025c306a 100644 --- a/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/db-2.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/db-2.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "2.1"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/fe-3.1/ebin/fe.app index d3bd85cda6..33d44805bd 100644 --- a/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_missing_src/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-2.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-2.1/ebin/fe.app index 47ea248720..717d30cf45 100644 --- a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-2.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-2.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-3.1/ebin/fe.app index 0696e2494c..682d40eb12 100644 --- a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-500.18.7/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-500.18.7/ebin/fe.app index 3a5c0ddd9b..77b97979cb 100644 --- a/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-500.18.7/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_no_appup/lib/fe-500.18.7/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "500.18.7"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.0/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.0/ebin/db.app index 22530ee335..3968ce3c32 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.0/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.0/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "1.0"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.1/ebin/db.app index 7243a0a96a..0f0c926fbd 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-1.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "1.1"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-2.1/ebin/db.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-2.1/ebin/db.app index 202d7f1234..6901d225e2 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-2.1/ebin/db.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/db-2.1/ebin/db.app @@ -1,7 +1,7 @@ {application, db, [{description, "ERICSSON NR FOR DB"}, {vsn, "2.1"}, - {modules, [{db1, "1.0"}, {db2, "1.0"}]}, + {modules, [db1, db2]}, {registered, []}, {applications, []}, {mod, {db1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1.1/ebin/fe.app index c7ba1dfe91..d963a7e7fa 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1/ebin/fe.app index 47ea248720..717d30cf45 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-2.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-3.1/ebin/fe.app index 0696e2494c..682d40eb12 100644 --- a/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1.1/ebin/fe.app index c7ba1dfe91..d963a7e7fa 100644 --- a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1/ebin/fe.app index 47ea248720..717d30cf45 100644 --- a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-2.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "2.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {env, []}, diff --git a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-3.1/ebin/fe.app b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-3.1/ebin/fe.app index 0696e2494c..682d40eb12 100644 --- a/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-3.1/ebin/fe.app +++ b/lib/sasl/test/systools_SUITE_data/d_regexp_appup/lib/fe-3.1/ebin/fe.app @@ -1,7 +1,7 @@ {application, fe, [{description, "ERICSSON NR FOR FE"}, {vsn, "3.1"}, - {modules, [{fe1, "1.0"}, {fe2, "1.0"}, {fe3, "2.0"}]}, + {modules, [fe1, fe2, fe3]}, {registered, []}, {applications, []}, {mod, {fe1, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app new file mode 100644 index 0000000000..3d38a3dde4 --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/ebin/ua.app @@ -0,0 +1,9 @@ +%% -*- coding: utf-8 -*- +{application, ua, + [{description, "αβ"}, + {vsn, "1.0"}, + {modules, [ua1]}, + {registered, []}, + {applications, []}, + {env, []}, + {start, {ua1, start, []}}]}. diff --git a/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/src/ua1.erl b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/src/ua1.erl new file mode 100644 index 0000000000..e988e80f3d --- /dev/null +++ b/lib/sasl/test/systools_SUITE_data/d_unicode/lib/ua-1.0/src/ua1.erl @@ -0,0 +1,2 @@ +-module(ua1). +-vsn("1.0"). diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl index bd4aa9e7a7..0cb6e63cf3 100644 --- a/lib/sasl/test/systools_rc_SUITE.erl +++ b/lib/sasl/test/systools_rc_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2011. All Rights Reserved. +%% Copyright Ericsson AB 2010-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -46,7 +46,7 @@ syntax_check(Config) when is_list(Config) -> [#application{name = test, description = "TEST", vsn = "0.1", - modules = [{foo,1},{bar,1},{baz,1},{old_mod,1}], + modules = [foo,bar,baz,old_mod], regs = [], mod = {sasl, []}}, #application{name = snmp, @@ -59,7 +59,7 @@ syntax_check(Config) when is_list(Config) -> [#application{name = test, description = "TEST", vsn = "1.0", - modules = [{foo,1},{bar,1},{baz,1},{new_mod,1}], + modules = [foo,bar,baz,new_mod], regs = [], mod = {sasl, []}}], S1 = [ @@ -128,8 +128,8 @@ translate(Config) when is_list(Config) -> [#application{name = test, description = "TEST", vsn = "1.0", - modules = [{foo,1},{bar,1},{baz,1}, - {x,1},{y,1},{z,1}], + modules = [foo,bar,baz, + x,y,z], regs = [], mod = {sasl, []}}], %% Simple translation (1) @@ -439,7 +439,7 @@ translate_app(Config) when is_list(Config) -> [#application{name = test, description = "TEST", vsn = "1.0", - modules = [{foo,1},{bar,1},{baz,1}], + modules = [foo,bar,baz], regs = [], mod = {sasl, []}}, #application{name = pelle, @@ -452,7 +452,7 @@ translate_app(Config) when is_list(Config) -> [#application{name = test, description = "TEST", vsn = "1.0", - modules = [{foo,1},{bar,1},{baz,1}], + modules = [foo,bar,baz], regs = [], mod = {sasl, []}}], %% Simple translation (1) @@ -492,13 +492,13 @@ translate_emulator_restarts(_Config) -> [#application{name = test, description = "TEST", vsn = "1.0", - modules = [{foo,1},{bar,1},{baz,1}], + modules = [foo,bar,baz], regs = [], mod = {sasl, []}}, #application{name = test, description = "TEST2", vsn = "1.0", - modules = [{x,1},{y,1},{z,1}], + modules = [x,y,z], regs = [], mod = {sasl, []}}], %% restart_new_emulator |