aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/rh_test_lib.erl
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/sasl/test/rh_test_lib.erl
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/sasl/test/rh_test_lib.erl')
-rw-r--r--lib/sasl/test/rh_test_lib.erl20
1 files changed, 10 insertions, 10 deletions
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,"","").