From 196a453d877e637ea0128ababc07b475492bad37 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 14 Nov 2011 17:29:42 +0100 Subject: Fix bad error printout --- lib/common_test/src/ct_logs.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/common_test') diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index 6ad962469f..eea03b1db4 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -473,23 +473,26 @@ logger(Parent,Mode) -> put(basic_html, BasicHtml), %% copy stylesheet to log dir (both top dir and test run %% dir) so logs are independent of Common Test installation + {ok,Cwd} = file:get_cwd(), CTPath = code:lib_dir(common_test), CSSFileSrc = filename:join(filename:join(CTPath, "priv"), ?css_default), - CSSFileDestTop = filename:join(".", ?css_default), - CSSFileDestRun = filename:join(Dir, ?css_default), + CSSFileDestTop = filename:join(Cwd, ?css_default), + CSSFileDestRun = filename:join(AbsDir, ?css_default), case file:copy(CSSFileSrc, CSSFileDestTop) of {error,Reason0} -> io:format(user, "ERROR! "++ "CSS file ~p could not be copied to ~p. "++ - "Reason: ~p~n", [CSSFileDestTop, Reason0]), + "Reason: ~p~n", + [CSSFileSrc,CSSFileDestTop,Reason0]), exit({css_file_error,CSSFileDestTop}); _ -> case file:copy(CSSFileSrc, CSSFileDestRun) of {error,Reason1} -> io:format(user, "ERROR! "++ "CSS file ~p could not be copied to ~p. "++ - "Reason: ~p~n", [CSSFileDestRun, Reason1]), + "Reason: ~p~n", + [CSSFileSrc,CSSFileDestRun,Reason1]), exit({css_file_error,CSSFileDestRun}); _ -> ok -- cgit v1.2.3