aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_framework.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-04-13 15:20:37 +0200
committerPeter Andersson <[email protected]>2015-04-13 15:20:37 +0200
commit47c730909fccad1733e7cfce0ba42561edb3e9ea (patch)
tree5b6152463df5ce9346747a103c3667c5faa3b6e2 /lib/common_test/src/ct_framework.erl
parent6e3e48d39a77aa18b92fb048d6a910baa71badf3 (diff)
downloadotp-47c730909fccad1733e7cfce0ba42561edb3e9ea.tar.gz
otp-47c730909fccad1733e7cfce0ba42561edb3e9ea.tar.bz2
otp-47c730909fccad1733e7cfce0ba42561edb3e9ea.zip
Fix problem with suite compilation failures not being correctly reported
Also do some minor logging improvements
Diffstat (limited to 'lib/common_test/src/ct_framework.erl')
-rw-r--r--lib/common_test/src/ct_framework.erl14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index 498950c9d1..ea3d7c8218 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -873,8 +873,8 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
end,
PrintErr = fun(ErrFormat, ErrArgs) ->
- Div = "~n- - - - - - - - - - - - - - - - "
- "- - - - - - - - - -~n",
+ Div = "~n- - - - - - - - - - - - - - - - - - - "
+ "- - - - - - - - - - - - - - - - - - - - -~n",
io:format(user, lists:concat([Div,ErrFormat,Div,"~n"]),
ErrArgs),
Link =
@@ -1063,8 +1063,14 @@ get_all_cases1(_, []) ->
get_all(Mod, ConfTests) ->
case catch apply(Mod, all, []) of
{'EXIT',_} ->
- Reason =
- list_to_atom(atom_to_list(Mod)++":all/0 is missing"),
+ Reason =
+ case code:which(Mod) of
+ non_existing ->
+ list_to_atom(atom_to_list(Mod)++
+ " can not be compiled or loaded");
+ _ ->
+ list_to_atom(atom_to_list(Mod)++":all/0 is missing")
+ end,
%% this makes test_server call error_in_suite as first
%% (and only) test case so we can report Reason properly
[{?MODULE,error_in_suite,[[{error,Reason}]]}];