aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-05 12:31:38 +0100
committerBjörn Gustavsson <[email protected]>2011-12-05 12:31:38 +0100
commitbdc69e0c35229fe11c98c14715b040b2f0eee5aa (patch)
tree33e9fe280bfaee82e3a5facd597a78ce6625d29b /erts
parentf667e4a47b07b07ed035073b94d699ff5fe0ba9b (diff)
parent6e36ca17f9c36a420702c683f1e09c2b7daa58bc (diff)
downloadotp-bdc69e0c35229fe11c98c14715b040b2f0eee5aa.tar.gz
otp-bdc69e0c35229fe11c98c14715b040b2f0eee5aa.tar.bz2
otp-bdc69e0c35229fe11c98c14715b040b2f0eee5aa.zip
Merge branch 'bjorn/test-cases'
* bjorn/test-cases: lcnt_SUITE: Be kind to slow machines crypto_SUITE: Reinstate what was "lost in translation" fileTransferSUITE: Cope with missing/broken crypto application sensitive_SUITE: Fix spuriously failing recv_trace/1 eprof_SUITE: Cope with fast computers and bad time measurements cover_SUITE: Cope with missing/broken crypto application otp_SUITE: Write log files about undefined functions and so on
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/test/sensitive_SUITE.erl3
-rw-r--r--erts/test/otp_SUITE.erl38
2 files changed, 28 insertions, 13 deletions
diff --git a/erts/emulator/test/sensitive_SUITE.erl b/erts/emulator/test/sensitive_SUITE.erl
index 634df367ca..e073eab596 100644
--- a/erts/emulator/test/sensitive_SUITE.erl
+++ b/erts/emulator/test/sensitive_SUITE.erl
@@ -160,8 +160,7 @@ recv_trace(Config) when is_list(Config) ->
?line {messages,Messages} = process_info(Tracer, messages),
[{trace,Parent,'receive',a},
{trace,Parent,'receive',{trace_delivered,_,_}},
- {trace,Parent,'receive',c},
- {trace,Parent,'receive',{trace_delivered,_,_}}] = Messages,
+ {trace,Parent,'receive',c}|_] = Messages,
?line unlink(Tracer), exit(Tracer, kill),
?line unlink(Sender), exit(Sender, kill),
diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl
index d61fbbddcf..79cd91221f 100644
--- a/erts/test/otp_SUITE.erl
+++ b/erts/test/otp_SUITE.erl
@@ -94,15 +94,16 @@ undefined_functions(Config) when is_list(Config) ->
case Undef of
[] -> ok;
_ ->
+ Fd = open_log(Config, "undefined_functions"),
foreach(fun ({MFA1,MFA2}) ->
io:format("~s calls undefined ~s",
+ [format_mfa(MFA1),format_mfa(MFA2)]),
+ io:format(Fd, "~s ~s\n",
[format_mfa(MFA1),format_mfa(MFA2)])
end, Undef),
+ close_log(Fd),
?line ?t:fail({length(Undef),undefined_functions_in_otp})
-
- end,
-
- ok.
+ end.
hipe_filter(Undef) ->
case erlang:system_info(hipe_architecture) of
@@ -211,7 +212,10 @@ deprecated_not_in_obsolete(Config) when is_list(Config) ->
_ ->
io:put_chars("The following functions have -deprecated() attributes,\n"
"but are not listed in otp_internal:obsolete/3.\n"),
- ?line print_mfas(L),
+ ?line print_mfas(group_leader(), L),
+ Fd = open_log(Config, "deprecated_not_obsolete"),
+ print_mfas(Fd, L),
+ close_log(Fd),
?line ?t:fail({length(L),deprecated_but_not_obsolete})
end.
@@ -232,11 +236,13 @@ obsolete_but_not_deprecated(Config) when is_list(Config) ->
io:put_chars("The following functions are listed "
"in otp_internal:obsolete/3,\n"
"but don't have -deprecated() attributes.\n"),
- ?line print_mfas(L),
+ ?line print_mfas(group_leader(), L),
+ Fd = open_log(Config, "obsolete_not_deprecated"),
+ print_mfas(Fd, L),
+ close_log(Fd),
?line ?t:fail({length(L),obsolete_but_not_deprecated})
end.
-
call_to_deprecated(Config) when is_list(Config) ->
Server = ?config(xref_server, Config),
?line {ok,DeprecatedCalls} = xref:q(Server, "strict(E || DF)"),
@@ -302,10 +308,20 @@ strong_components(Config) when is_list(Config) ->
%%%
-print_mfas([MFA|T]) ->
- io:format("~s\n", [format_mfa(MFA)]),
- print_mfas(T);
-print_mfas([]) -> ok.
+print_mfas(Fd, [MFA|T]) ->
+ io:format(Fd, "~s\n", [format_mfa(MFA)]),
+ print_mfas(Fd, T);
+print_mfas(_, []) -> ok.
format_mfa({M,F,A}) ->
lists:flatten(io_lib:format("~s:~s/~p", [M,F,A])).
+
+open_log(Config, Name) ->
+ PrivDir = ?config(priv_dir, Config),
+ RunDir = filename:dirname(filename:dirname(PrivDir)),
+ Path = filename:join(RunDir, "system_"++Name++".log"),
+ {ok,Fd} = file:open(Path, [write]),
+ Fd.
+
+close_log(Fd) ->
+ ok = file:close(Fd).