aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/rh_test_lib.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-02-13 20:53:45 +0100
committerSiri Hansen <[email protected]>2013-05-14 17:01:54 +0200
commit44b76ccb2f2640e27214f3286acb5d798920babc (patch)
treec227fd82bb90e7fd271fcf2c3a0b8e5a3715a0a5 /lib/sasl/test/rh_test_lib.erl
parent6a093c47d87707480d1710fc6790b57f1520cef7 (diff)
downloadotp-44b76ccb2f2640e27214f3286acb5d798920babc.tar.gz
otp-44b76ccb2f2640e27214f3286acb5d798920babc.tar.bz2
otp-44b76ccb2f2640e27214f3286acb5d798920babc.zip
[sasl] Update tests to run under unicode path
In order to test that unicode paths can be used in release handling, the release_handler_SUITE will use a priv_dir with unicode characters if the file name translation mode is utf8 (not on windows).
Diffstat (limited to 'lib/sasl/test/rh_test_lib.erl')
-rw-r--r--lib/sasl/test/rh_test_lib.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl
index 99a7f919a7..06efa4acea 100644
--- a/lib/sasl/test/rh_test_lib.erl
+++ b/lib/sasl/test/rh_test_lib.erl
@@ -1,5 +1,6 @@
-module(rh_test_lib).
+-export([cmd/3]).
-export([erlsrv/3,
erlsrv/4]).
-export([get_service_args/3,
@@ -10,6 +11,16 @@
get_client_args/4]).
+cmd(Cmd,Args,Env) ->
+ case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of
+ Port when is_port(Port) ->
+ unlink(Port),
+ erlang:port_close(Port),
+ ok;
+ Error ->
+ Error
+ end.
+
erlsrv(Erlsrv,Action,Name) ->
erlsrv(Erlsrv,Action,Name,"").
erlsrv(Erlsrv,Action,Name,Rest) ->