From 9d95abb3597eb4e19df40704fe8533b5d384d3e9 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 31 May 2017 19:13:36 +0200 Subject: [ct] Print unicode atoms and strings correctly in common_test logs And use correct encoding when printing to files. --- lib/common_test/test_server/ts_install.erl | 2 +- lib/common_test/test_server/ts_make.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common_test/test_server') diff --git a/lib/common_test/test_server/ts_install.erl b/lib/common_test/test_server/ts_install.erl index 5734bd0787..b78258227c 100644 --- a/lib/common_test/test_server/ts_install.erl +++ b/lib/common_test/test_server/ts_install.erl @@ -136,7 +136,7 @@ unix_autoconf(XConf) -> true -> OSXEnv = macosx_cflags(), UnQuotedEnv = assign_vars(unquote(Env++OSXEnv)), - io:format("Running ~s~nEnv: ~p~n", + io:format("Running ~ts~nEnv: ~p~n", [lists:flatten(Configure ++ Args),UnQuotedEnv]), Port = open_port({spawn, lists:flatten(["\"",Configure,"\"",Args])}, [stream, eof, {env,UnQuotedEnv}]), diff --git a/lib/common_test/test_server/ts_make.erl b/lib/common_test/test_server/ts_make.erl index 456e913c39..9284a0db33 100644 --- a/lib/common_test/test_server/ts_make.erl +++ b/lib/common_test/test_server/ts_make.erl @@ -42,7 +42,7 @@ unmake(Config) when is_list(Config) -> make(Make, Dir, Makefile) -> {RunFile, RunCmd, Script} = run_make_script(os:type(), Make, Dir, Makefile), - case file:write_file(RunFile, Script) of + case file:write_file(RunFile, unicode:characters_to_binary(Script)) of ok -> Log = filename:join(Dir, "make.log"), file:delete(Log), -- cgit v1.2.3