summaryrefslogtreecommitdiff
path: root/lib/megaco
diff options
context:
space:
mode:
authorMicael Karlberg <bmk@erlang.org>2022-08-29 18:15:06 +0200
committerMicael Karlberg <bmk@erlang.org>2022-09-02 18:01:18 +0200
commit8d3e34316e253681fc012bf18cee9be5809ead8a (patch)
treed8c376f44fb69e9a7b1e4a51cd4ebbcf5f851e66 /lib/megaco
parent62cea753914bc42f82f19fe41dbaf49ea44e0615 (diff)
downloaderlang-8d3e34316e253681fc012bf18cee9be5809ead8a.tar.gz
[megaco|test] Adjust error report function
"Magically" wrap'ed error in such a way that the test wrapper themselves did not detect that an error had occured (and therefor could not do checks).
Diffstat (limited to 'lib/megaco')
-rw-r--r--lib/megaco/test/megaco_test_lib.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/megaco/test/megaco_test_lib.erl b/lib/megaco/test/megaco_test_lib.erl
index 2937ff4da9..145a9b9920 100644
--- a/lib/megaco/test/megaco_test_lib.erl
+++ b/lib/megaco/test/megaco_test_lib.erl
@@ -78,7 +78,7 @@
-include("megaco_test_lib.hrl").
--record('REASON', {mod, line, desc}).
+%% -record('REASON', {mod, line, desc}).
%% ----------------------------------------------------------------
@@ -364,19 +364,11 @@ display_system_info(WhenStr, ModFuncStr) ->
%% Stores the result in the process dictionary if mismatch
error(Actual, Mod, Line) ->
- global:send(megaco_global_logger, {failed, Mod, Line}),
log("<ERROR> Bad result: ~p~n", [Actual], Mod, Line),
Label = lists:concat([Mod, "(", Line, ") unexpected result"]),
megaco:report_event(60, Mod, Mod, Label,
[{line, Mod, Line}, {error, Actual}]),
- case global:whereis_name(megaco_test_case_sup) of
- undefined ->
- ignore;
- Pid ->
- Fail = #'REASON'{mod = Mod, line = Line, desc = Actual},
- Pid ! {fail, self(), Fail}
- end,
- Actual.
+ exit(Actual).
log(Format, Args, Mod, Line) ->
case global:whereis_name(megaco_global_logger) of