aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src/test_server_ctrl.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-09-14 15:59:45 +0200
committerBjörn Gustavsson <[email protected]>2012-09-19 11:51:35 +0200
commit1a2b1519b290bcf9842fcad6152ab1ee7edb1e14 (patch)
tree620deeb8fb943468b39312ec64695f3859c8fc39 /lib/test_server/src/test_server_ctrl.erl
parent4be621ce3f116185500d6ef7282222cec3dc743e (diff)
downloadotp-1a2b1519b290bcf9842fcad6152ab1ee7edb1e14.tar.gz
otp-1a2b1519b290bcf9842fcad6152ab1ee7edb1e14.tar.bz2
otp-1a2b1519b290bcf9842fcad6152ab1ee7edb1e14.zip
Teach test_server to report severe errors to common_test
If a severe error occurs in test_server (e.g. failing to write to log files), test_server would terminate without commont_test knowing about it. Since ct_run can now return an exit code, it is important that common_test is aware of severe problem so that it can indicate that an error has occurred.
Diffstat (limited to 'lib/test_server/src/test_server_ctrl.erl')
-rw-r--r--lib/test_server/src/test_server_ctrl.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index f5b43085b5..f7266e5632 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -1417,6 +1417,7 @@ init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev}, RejectIoReqs,
{'EXIT',_Pid,Reason} ->
print(1, "EXIT, reason ~p", [Reason]);
{'EXIT',Reason} ->
+ report_severe_error(Reason),
print(1, "EXIT, reason ~p", [Reason]);
_Other ->
print(25, "DONE", [])
@@ -1440,6 +1441,9 @@ init_tester(Mod, Func, Args, Dir, Name, {SumLev,MajLev,MinLev}, RejectIoReqs,
"</tfoot>\n",
[Time,SuccessStr,OkN,FailedN,SkipStr,OkN+FailedN+SkippedN]).
+report_severe_error(Reason) ->
+ test_server_sup:framework_call(report, [severe_error,Reason]).
+
%% timer:tc/3
ts_tc(M, F, A) ->
Before = ?now,