aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2018-05-09 10:15:39 +0200
committerRichard Carlsson <[email protected]>2018-05-09 10:15:48 +0200
commit123b0d73a54062a983e16d90cfde466abc4226bc (patch)
treed6f9c4d89b65577bbc5a4701a9b7c00570aad903
parent3fd01b76d6940e6f161608d728a6bc679f1c9835 (diff)
downloadotp-123b0d73a54062a983e16d90cfde466abc4226bc.tar.gz
otp-123b0d73a54062a983e16d90cfde466abc4226bc.tar.bz2
otp-123b0d73a54062a983e16d90cfde466abc4226bc.zip
Eliminate call to ct:get_progname() in ts_erl_config
During cross compilation, the ct module is not available.
-rw-r--r--lib/common_test/test_server/ts_erl_config.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/common_test/test_server/ts_erl_config.erl b/lib/common_test/test_server/ts_erl_config.erl
index 7104155365..e37fa844bb 100644
--- a/lib/common_test/test_server/ts_erl_config.erl
+++ b/lib/common_test/test_server/ts_erl_config.erl
@@ -358,7 +358,15 @@ link_library(_LibName,_Other) ->
%% Returns emulator specific variables.
emu_vars(Vars) ->
[{is_source_build, is_source_build()},
- {erl_name, ct:get_progname()}|Vars].
+ {erl_name, get_progname()}|Vars].
+
+get_progname() ->
+ case init:get_argument(progname) of
+ {ok, [[Prog]]} ->
+ Prog;
+ _Other ->
+ "no_prog_name"
+ end.
is_source_build() ->
string:find(erlang:system_info(system_version), "source") =/= nomatch.