aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-06-15 16:52:12 +0200
committerSiri Hansen <[email protected]>2011-06-15 16:52:12 +0200
commit03842c215fa5cd90ea72bc135e29a25065199e4e (patch)
tree561c0453029d33edf4a1478381180d7960651d98 /lib
parente751eb8d6e8fd5945d4a14ebbc10b9cd858521e1 (diff)
downloadotp-03842c215fa5cd90ea72bc135e29a25065199e4e.tar.gz
otp-03842c215fa5cd90ea72bc135e29a25065199e4e.tar.bz2
otp-03842c215fa5cd90ea72bc135e29a25065199e4e.zip
Remove path to erts bin dir from erlsrv arguments
The service will automatically use the start_erl.exe from the same directory as erlsrv.exe, and heart will use $PATH, which will always have the erts bin dir first. The reason is to avoid using old executables after upgrading erts via the release_handler.
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl/test/installer.erl2
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl19
-rw-r--r--lib/sasl/test/rh_test_lib.erl20
3 files changed, 20 insertions, 21 deletions
diff --git a/lib/sasl/test/installer.erl b/lib/sasl/test/installer.erl
index 8515fb7478..f5ceab0dc4 100644
--- a/lib/sasl/test/installer.erl
+++ b/lib/sasl/test/installer.erl
@@ -634,7 +634,7 @@ start_client_win32(TestNode,Client,ClientSname) ->
RootDir),
StartErlArgs = rh_test_lib:get_start_erl_args(RootDir,RelClientDir,
ClientArgs),
- ServiceArgs = rh_test_lib:get_service_args("4.4", RootDir, RelClientDir,
+ ServiceArgs = rh_test_lib:get_service_args(RootDir, RelClientDir,
ClientSname, StartErlArgs),
?print([{start_client,ClientSname},ServiceArgs]),
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index d56c90d979..16267ba0d4 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1039,17 +1039,17 @@ delete_release(Conf) ->
?t:format("======== deleting ~p~n",[Dirs]),
ok = delete_release_os(Dirs--["save"]),
- {ok,Remaining} = file:list_dir(PrivDir),
+ {ok,Remaining} = file:list_dir(PrivDir),
?t:format("======== remaining ~p~n",[Remaining]),
- case Remaining of
- [] -> ok;
+ case Remaining of
+ [] ->
+ ok;
_ ->
- delete_release_os(Remaining),
- Remaining2 = file:list_dir(PrivDir),
- ?t:format("======== remaining after second try ~p~n",[Remaining2])
- end,
-
+ delete_release_os(Remaining),
+ Remaining2 = file:list_dir(PrivDir),
+ ?t:format("======== remaining after second try ~p~n",[Remaining2])
+ end,
ok = file:set_cwd(OrigWd),
ok.
@@ -1608,8 +1608,7 @@ start_node_win32(Sname,NodeDir) ->
ErtsBinDir = filename:join(NodeDir,"erts-4.4/bin"),
StartErlArgs = rh_test_lib:get_start_erl_args(NodeDir),
- ServiceArgs = rh_test_lib:get_service_args("4.4", NodeDir, Sname,
- StartErlArgs),
+ ServiceArgs = rh_test_lib:get_service_args(NodeDir, Sname, StartErlArgs),
Erlsrv = filename:nativename(filename:join(ErtsBinDir,"erlsrv")),
rh_test_lib:erlsrv(Erlsrv,stop,Name),
diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl
index f192f4d585..99a7f919a7 100644
--- a/lib/sasl/test/rh_test_lib.erl
+++ b/lib/sasl/test/rh_test_lib.erl
@@ -2,8 +2,8 @@
-export([erlsrv/3,
erlsrv/4]).
--export([get_service_args/4,
- get_service_args/5,
+-export([get_service_args/3,
+ get_service_args/4,
get_start_erl_args/1,
get_start_erl_args/3,
get_client_args/3,
@@ -42,16 +42,16 @@ recv_prog_output(Port) ->
end
end.
-get_service_args(EVsn, RootDir, Sname, StartErlArgs) ->
- get_service_args(EVsn, RootDir, "", Sname, StartErlArgs).
-get_service_args(EVsn, RootDir, RelClientDir, Sname, StartErlArgs) ->
- ErtsBinDir = filename:join([RootDir,"erts-"++EVsn,"bin"]),
- StartErl = filename:nativename(filename:join(ErtsBinDir,"start_erl")),
+get_service_args(RootDir, Sname, StartErlArgs) ->
+ get_service_args(RootDir, "", Sname, StartErlArgs).
+get_service_args(RootDir, RelClientDir, Sname, StartErlArgs) ->
LogDir = filename:nativename(filename:join([RootDir,RelClientDir,"log"])),
- HeartCmd = filename:nativename(filename:join(ErtsBinDir,"heart_restart.bat")),
- " -machine " ++ StartErl ++ " -workdir " ++ LogDir ++
+ %% start_erl.exe will be found since it is in the same directory as erlsrv.exe
+ %% And heart_restart.bat will be found since the erts bin dir is
+ %% always in the path for the erlang virtual machine.
+ " -machine start_erl.exe -workdir " ++ LogDir ++
" -debugtype new -sname " ++ atom_to_list(Sname) ++
- " -env HEART_COMMAND=" ++ HeartCmd ++ " -args \"" ++ StartErlArgs ++ "\"".
+ " -env HEART_COMMAND=heart_restart.bat -args \"" ++ StartErlArgs ++ "\"".
get_start_erl_args(RootDir) ->
get_start_erl_args(RootDir,"","").