diff options
author | Peter Lemenkov <[email protected]> | 2014-12-02 13:31:37 +0300 |
---|---|---|
committer | Peter Lemenkov <[email protected]> | 2014-12-15 21:05:05 +0300 |
commit | bb7fb3c31d1939ab39fb14322d11a59bc34d8f42 (patch) | |
tree | b3a37d800ac7d073723cd5cc02da09839e2b79e8 /lib/test_server/src/ts_install.erl | |
parent | 5cbad390e971ff92a7fb1b71757041ff9edeb81a (diff) | |
download | otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.tar.gz otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.tar.bz2 otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.zip |
Start using os:getenv/2 fun
See #535
Signed-off-by: Peter Lemenkov <[email protected]>
Diffstat (limited to 'lib/test_server/src/ts_install.erl')
-rw-r--r-- | lib/test_server/src/ts_install.erl | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/test_server/src/ts_install.erl b/lib/test_server/src/ts_install.erl index bc62015ac3..a41409f2fd 100644 --- a/lib/test_server/src/ts_install.erl +++ b/lib/test_server/src/ts_install.erl @@ -112,12 +112,6 @@ 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,[]), @@ -128,7 +122,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 <- config_flags(), + MXX_Build = [Y || Y <- string:tokens(os:getenv("CONFIG_FLAGS", ""), " \t\n"), Y == "--enable-m64-build" orelse Y == "--enable-m32-build"], Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build, @@ -234,7 +228,7 @@ add_vars(Vars0, Opts0) -> {Opts, [{longnames, LongNames}, {platform_id, PlatformId}, {platform_filename, PlatformFilename}, - {rsh_name, get_rsh_name()}, + {rsh_name, os:getenv("ERL_RSH", "rsh")}, {platform_label, PlatformLabel}, {ts_net_dir, Mounted}, {erl_flags, []}, @@ -255,12 +249,6 @@ 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. |