aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-03-12 10:30:05 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 10:30:05 +0100
commitc87e11b41c28318086ec612f5ad10bbc9d26f955 (patch)
tree5da2315a72422024b6bd4be9a020f19c1271aa70 /lib
parent7efa93c9dd4ce25c5754c1b72ec804e8172c0099 (diff)
parent74a1570cd945fdbd0eb139e051f29760a46e50ba (diff)
downloadotp-c87e11b41c28318086ec612f5ad10bbc9d26f955.tar.gz
otp-c87e11b41c28318086ec612f5ad10bbc9d26f955.tar.bz2
otp-c87e11b41c28318086ec612f5ad10bbc9d26f955.zip
Merge branch 'egil/revert-os_getenv-test_server'
* egil/revert-os_getenv-test_server: Revert "Start using os:getenv/2 fun" in test_server
Diffstat (limited to 'lib')
-rw-r--r--lib/test_server/src/ts_install.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/test_server/src/ts_install.erl b/lib/test_server/src/ts_install.erl
index a41409f2fd..bc62015ac3 100644
--- a/lib/test_server/src/ts_install.erl
+++ b/lib/test_server/src/ts_install.erl
@@ -112,6 +112,12 @@ get_vars([], name, [], Result) ->
get_vars(_, _, _, _) ->
{error, fatal_bad_conf_vars}.
+config_flags() ->
+ case os:getenv("CONFIG_FLAGS") of
+ false -> [];
+ CF -> string:tokens(CF, " \t\n")
+ end.
+
unix_autoconf(XConf) ->
Configure = filename:absname("configure"),
Flags = proplists:get_value(crossflags,XConf,[]),
@@ -122,7 +128,7 @@ unix_autoconf(XConf) ->
erlang:system_info(threads) /= false],
Debug = [" --enable-debug-mode" ||
string:str(erlang:system_info(system_version),"debug") > 0],
- MXX_Build = [Y || Y <- string:tokens(os:getenv("CONFIG_FLAGS", ""), " \t\n"),
+ MXX_Build = [Y || Y <- config_flags(),
Y == "--enable-m64-build"
orelse Y == "--enable-m32-build"],
Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build,
@@ -228,7 +234,7 @@ add_vars(Vars0, Opts0) ->
{Opts, [{longnames, LongNames},
{platform_id, PlatformId},
{platform_filename, PlatformFilename},
- {rsh_name, os:getenv("ERL_RSH", "rsh")},
+ {rsh_name, get_rsh_name()},
{platform_label, PlatformLabel},
{ts_net_dir, Mounted},
{erl_flags, []},
@@ -249,6 +255,12 @@ get_testcase_callback() ->
end
end.
+get_rsh_name() ->
+ case os:getenv("ERL_RSH") of
+ false -> "rsh";
+ Str -> Str
+ end.
+
platform_id(Vars) ->
{Id,_,_,_} = platform(Vars),
Id.