diff options
author | Peter Andersson <[email protected]> | 2011-11-14 17:29:42 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-11-14 17:29:42 +0100 |
commit | 196a453d877e637ea0128ababc07b475492bad37 (patch) | |
tree | 0c3122fcff1e81689d1a6107b9c590e626cc6671 /lib | |
parent | be0c9a73c891a8d12a249abf558770f540f316e9 (diff) | |
download | otp-196a453d877e637ea0128ababc07b475492bad37.tar.gz otp-196a453d877e637ea0128ababc07b475492bad37.tar.bz2 otp-196a453d877e637ea0128ababc07b475492bad37.zip |
Fix bad error printout
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common_test/src/ct_logs.erl | 11 |
1 files changed, 7 insertions, 4 deletions
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 |