From c954cca3a5aaada476c12dc80a4b0adcd3eb3a0d Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 16 Apr 2013 14:55:43 +0200 Subject: [common_test] Add link from red error notification to full error description In test case log, the red error notification may sometimes be truncated. This commit adds a link from this printout to the end of the log where the full error description and stacktrace i written. --- lib/common_test/priv/ct_default.css | 8 ++++++++ lib/common_test/src/ct_framework.erl | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/common_test') diff --git a/lib/common_test/priv/ct_default.css b/lib/common_test/priv/ct_default.css index 1188f8f676..ff48b4fdc0 100644 --- a/lib/common_test/priv/ct_default.css +++ b/lib/common_test/priv/ct_default.css @@ -96,6 +96,14 @@ div.ct_error_notify { margin: .2em 0 0 0; } +div.ct_error_notify a:link { + color: #D0D0D0; +} + +div.ct_error_notify a:visited { + color: #AAAAAA; +} + div.default { background: lightgreen; color: black; font-family: "Monaco", "Andale Mono", "Consolas", monospace; diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index 3cbcccaf42..276f902b05 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -807,10 +807,14 @@ error_notification(Mod,Func,_Args,{Error,Loc}) -> "- - - - - - - - - -~n", io:format(user, lists:concat([Div,ErrFormat,Div,"~n"]), ErrArgs), + Link = + "\n\n" + "Full error description and stacktrace" + "", ct_logs:tc_log(ct_error_notify, ?MAX_IMPORTANCE, "CT Error Notification", - ErrFormat, ErrArgs) + ErrFormat++Link, ErrArgs) end, case Loc of [{?MODULE,error_in_suite}] -> -- cgit v1.2.3