aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/release_handler_SUITE.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-11-29 09:50:42 +0100
committerDan Gudmundsson <[email protected]>2013-11-29 09:50:42 +0100
commitd299987d7e22d1236f14a4e097e8ee805a1b72ea (patch)
tree377b3ffd0c088580b1713f51d238c46e24da9fd2 /lib/sasl/test/release_handler_SUITE.erl
parentac7902caa784d4f4c73eb7291ab4736a75ad13a4 (diff)
parenta9340a1692b0ae4d3b3c0328d007ac4a7db5cc75 (diff)
downloadotp-d299987d7e22d1236f14a4e097e8ee805a1b72ea.tar.gz
otp-d299987d7e22d1236f14a4e097e8ee805a1b72ea.tar.bz2
otp-d299987d7e22d1236f14a4e097e8ee805a1b72ea.zip
Merge branch 'dgud/sasl/no_dot_erlang_boot/OTP-8479' into maint
* dgud/sasl/no_dot_erlang_boot/OTP-8479: sasl: Add no_dot_erlang documentation and tests sasl: Add no_dot_erlang start script
Diffstat (limited to 'lib/sasl/test/release_handler_SUITE.erl')
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl33
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index a56924d5ca..d7369b0ecf 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -64,7 +64,7 @@ cases() ->
supervisor_which_children_timeout,
release_handler_which_releases, install_release_syntax_check,
upgrade_supervisor, upgrade_supervisor_fail, otp_9864,
- otp_10463_upgrade_script_regexp].
+ otp_10463_upgrade_script_regexp, no_dot_erlang].
groups() ->
[{release,[],
@@ -1709,6 +1709,37 @@ otp_10463_upgrade_script_regexp(_Config) ->
release_handler:upgrade_script(kernel,code:lib_dir(kernel)),
ok.
+no_dot_erlang(Conf) ->
+ PrivDir = priv_dir(Conf),
+ {ok, OrigWd} = file:get_cwd(),
+ try
+ ok = file:set_cwd(PrivDir),
+
+ Erl = filename:join([code:root_dir(),"bin","erl"]),
+ Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt",
+ ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>),
+
+ case os:cmd(Erl ++ Args) of
+ "DOT_ERLANG_READ" ++ _ -> ok;
+ Other1 ->
+ io:format("Failed: ~s~n",[Erl ++ Args]),
+ io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]),
+ io:format("Got: ~s~n",[Other1]),
+ exit(failed_to_start, test_error)
+ end,
+ NO_DOT_ERL = " -boot no_dot_erlang",
+ case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of
+ "TESTOK" ++ _ -> ok;
+ Other2 ->
+ io:format("Failed: ~s~n",[Erl ++ Args]),
+ io:format("Expected: ~s~n",["TESTOK"]),
+ io:format("Got: ~s~n",[Other2]),
+ exit(failed_to_start, no_dot_erlang)
+ end
+ after
+ _ = file:delete(".erlang"),
+ ok = file:set_cwd(OrigWd)
+ end.
%%%=================================================================
%%% Misceleaneous functions