aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-09-10 12:10:37 +0200
committerSiri Hansen <[email protected]>2012-09-10 16:48:14 +0200
commit3ab7612516b5c7e49a002ad3ea0a286ee54520e2 (patch)
treeaaeb2cf02745ca36193b38b3e0cd6f95572acf65
parent389e50cac7c7a490c10315a1140c6d7752f24149 (diff)
downloadotp-3ab7612516b5c7e49a002ad3ea0a286ee54520e2.tar.gz
otp-3ab7612516b5c7e49a002ad3ea0a286ee54520e2.tar.bz2
otp-3ab7612516b5c7e49a002ad3ea0a286ee54520e2.zip
Make sure release_handler_SUITE does not mess up sasl test directory
release_handler_SUITE:otp_9864 deleted parts of the release_handler_SUITE_data directory so the test suite could not be executed twice without re-installation. This has been corrected.
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index a8e3cc3d88..070f0dd8ea 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1210,8 +1210,14 @@ otp_9864(Conf) ->
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 +1235,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 +1245,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