diff options
author | Micael Karlberg <[email protected]> | 2011-04-06 15:11:00 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-06 15:11:00 +0200 |
commit | 4346b5dae76052e8c06b1cda70d561b10c1c486d (patch) | |
tree | 8de6b459b429aa24e1bd9738a4fb3b6e07a083a8 /lib/reltool | |
parent | 3bc0fccb951ffb0909d2824b65d58ad31ad16cc5 (diff) | |
parent | d8dcd70f386de09109ca1f6f817a381cd1387769 (diff) | |
download | otp-4346b5dae76052e8c06b1cda70d561b10c1c486d.tar.gz otp-4346b5dae76052e8c06b1cda70d561b10c1c486d.tar.bz2 otp-4346b5dae76052e8c06b1cda70d561b10c1c486d.zip |
Merge branch 'dev' into bmk/inets/inet56_integration
Diffstat (limited to 'lib/reltool')
-rw-r--r-- | lib/reltool/src/reltool_server.erl | 2 | ||||
-rw-r--r-- | lib/reltool/test/Makefile | 2 | ||||
-rw-r--r-- | lib/reltool/test/reltool_app_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/reltool/test/reltool_server_SUITE.erl | 34 |
4 files changed, 44 insertions, 11 deletions
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl index d7cad8b29e..9743289ca6 100644 --- a/lib/reltool/src/reltool_server.erl +++ b/lib/reltool/src/reltool_server.erl @@ -1318,7 +1318,7 @@ decode(#sys{} = Sys, [{Key, Val} | KeyVals], Status) -> Val =:= none; Val =:= undefined -> {Sys#sys{embedded_app_type = Val}, Status}; - app_file when Val =:= keep; Val =:= strip, Val =:= all -> + app_file when Val =:= keep; Val =:= strip; Val =:= all -> {Sys#sys{app_file = Val}, Status}; debug_info when Val =:= keep; Val =:= strip -> {Sys#sys{debug_info = Val}, Status}; diff --git a/lib/reltool/test/Makefile b/lib/reltool/test/Makefile index abd2e81cdf..62fe05238b 100644 --- a/lib/reltool/test/Makefile +++ b/lib/reltool/test/Makefile @@ -76,7 +76,7 @@ release_tests_spec: opt $(INSTALL_DATA) reltool.spec reltool.cover $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR) $(INSTALL_SCRIPT) rtt $(INSTALL_PROGS) $(RELSYSDIR) $(INSTALL_DATA) $(INSTALL_PROGS) $(RELSYSDIR) -# chmod -f -R u+w $(RELSYSDIR) +# chmod -R u+w $(RELSYSDIR) # @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) release_docs_spec: diff --git a/lib/reltool/test/reltool_app_SUITE.erl b/lib/reltool/test/reltool_app_SUITE.erl index 97076589ba..a6e00cde08 100644 --- a/lib/reltool/test/reltool_app_SUITE.erl +++ b/lib/reltool/test/reltool_app_SUITE.erl @@ -45,15 +45,16 @@ init_per_suite(Config) -> end_per_suite(Config) -> reltool_test_lib:end_per_suite(Config). +init_per_testcase(undef_funcs=Case, Config) -> + case test_server:is_debug() of + true -> + {skip,"Debug-compiled emulator -- far too slow"}; + false -> + Config2 = [{tc_timeout, timer:minutes(10)} | Config], + reltool_test_lib:init_per_testcase(Case, Config2) + end; init_per_testcase(Case, Config) -> - Config2 = - case Case of - undef_funcs -> - [{tc_timeout, timer:minutes(10)} | Config]; - _ -> - Config - end, - reltool_test_lib:init_per_testcase(Case, Config2). + reltool_test_lib:init_per_testcase(Case, Config). end_per_testcase(Func,Config) -> reltool_test_lib:end_per_testcase(Func,Config). diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl index ef3076f305..b77560db94 100644 --- a/lib/reltool/test/reltool_server_SUITE.erl +++ b/lib/reltool/test/reltool_server_SUITE.erl @@ -52,7 +52,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [start_server, set_config, create_release, create_script, create_target, create_embedded, - create_standalone, create_old_target]. + create_standalone, create_old_target, + otp_9135]. groups() -> []. @@ -110,6 +111,37 @@ set_config(_Config) -> ok. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% OTP-9135, test that app_file option can be set to all | keep | strip + +otp_9135(TestInfo) when is_atom(TestInfo) -> + reltool_test_lib:tc_info(TestInfo); +otp_9135(_Config) -> + Libs = lists:sort(erl_libs()), + StrippedDefaultSys = + case Libs of + [] -> []; + _ -> {lib_dirs, Libs} + end, + + Config1 = {sys,[{app_file, keep}]}, % this is the default + {ok, Pid1} = ?msym({ok, _}, reltool:start_server([{config, Config1}])), + ?m({ok, {sys,StrippedDefaultSys}}, reltool:get_config(Pid1)), + ?m(ok, reltool:stop(Pid1)), + + Config2 = {sys,[{app_file, strip}]}, + {ok, Pid2} = ?msym({ok, _}, reltool:start_server([{config, Config2}])), + ExpectedConfig2 = StrippedDefaultSys++[{app_file,strip}], + ?m({ok, {sys,ExpectedConfig2}}, reltool:get_config(Pid2)), + ?m(ok, reltool:stop(Pid2)), + + Config3 = {sys,[{app_file, all}]}, + {ok, Pid3} = ?msym({ok, _}, reltool:start_server([{config, Config3}])), + ExpectedConfig3 = StrippedDefaultSys++[{app_file,all}], + ?m({ok, {sys,ExpectedConfig3}}, reltool:get_config(Pid3)), + ?m(ok, reltool:stop(Pid3)), + ok. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generate releases create_release(TestInfo) when is_atom(TestInfo) -> |