aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/ts_erl_config.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-03 10:31:41 +0200
committerLukas Larsson <[email protected]>2012-05-03 10:31:41 +0200
commitc5d6ce6a07478c5ac19fdf2df244c4b837888d08 (patch)
tree494865a3356371ac55cb9e441647c84c4cf66bce /lib/test_server/src/ts_erl_config.erl
parent2dfae4928db3917b9ee8050626e05d7b57d4073f (diff)
parent378c651e7aab2d88cb29cccb1c0aae7ef895bb7a (diff)
downloadotp-c5d6ce6a07478c5ac19fdf2df244c4b837888d08.tar.gz
otp-c5d6ce6a07478c5ac19fdf2df244c4b837888d08.tar.bz2
otp-c5d6ce6a07478c5ac19fdf2df244c4b837888d08.zip
Merge branch 'sverk/cross_tests/OTP-10074' into maint
* sverk/cross_tests/OTP-10074: Fix include issues in when building tests Fix cross compile of testcases Update cross build system for tests to work
Diffstat (limited to 'lib/test_server/src/ts_erl_config.erl')
-rw-r--r--lib/test_server/src/ts_erl_config.erl24
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/test_server/src/ts_erl_config.erl b/lib/test_server/src/ts_erl_config.erl
index 5585e8ccd3..ed26156180 100644
--- a/lib/test_server/src/ts_erl_config.erl
+++ b/lib/test_server/src/ts_erl_config.erl
@@ -220,10 +220,6 @@ erl_interface(Vars,OsType) ->
_ ->
"" % VxWorks
end,
- CrossCompile = case OsType of
- vxworks -> "true";
- _ -> "false"
- end,
[{erl_interface_libpath, filename:nativename(LibPath)},
{erl_interface_sock_libs, sock_libraries(OsType)},
{erl_interface_lib, Lib},
@@ -232,8 +228,8 @@ erl_interface(Vars,OsType) ->
{erl_interface_eilib_drv, Lib1Drv},
{erl_interface_threadlib, ThreadLib},
{erl_interface_include, filename:nativename(Incl)},
- {erl_interface_mk_include, filename:nativename(MkIncl)},
- {erl_interface_cross_compile, CrossCompile} | Vars].
+ {erl_interface_mk_include, filename:nativename(MkIncl)}
+ | Vars].
ic(Vars, OsType) ->
{ClassPath, LibPath, Incl} =
@@ -276,8 +272,6 @@ lib_dir(Vars, Lib) ->
case {get_var(crossroot, Vars), LibLibDir} of
{{error, _}, _} -> %no crossroot
LibLibDir;
- {_, {error, _}} -> %no lib
- LibLibDir;
{CrossRoot, _} ->
%% XXX: Ugly. So ugly I won't comment it
%% /Patrik
@@ -299,18 +293,16 @@ lib_dir(Vars, Lib) ->
end.
erl_root(Vars) ->
- Root = code:root_dir(),
- case ts_lib:erlang_type() of
+ Root = case get_var(crossroot,Vars) of
+ {error, notfound} -> code:root_dir();
+ CrossRoot -> CrossRoot
+ end,
+ case ts_lib:erlang_type(Root) of
{srctree, _Version} ->
Target = get_var(target, Vars),
{srctree, Root, Target};
{_, _Version} ->
- case get_var(crossroot,Vars) of
- {error, notfound} ->
- {installed, Root};
- CrossRoot ->
- {installed, CrossRoot}
- end
+ {installed, Root}
end.