From 123b0d73a54062a983e16d90cfde466abc4226bc Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Wed, 9 May 2018 10:15:39 +0200 Subject: Eliminate call to ct:get_progname() in ts_erl_config During cross compilation, the ct module is not available. --- lib/common_test/test_server/ts_erl_config.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/common_test/test_server') 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. -- cgit v1.2.3