aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/test/megaco_test_lib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-04-10 08:56:22 +0200
committerMicael Karlberg <[email protected]>2013-04-10 08:56:22 +0200
commitfab2332f524c81a3e0186928cf3b64ee3190e259 (patch)
tree5fa9d0b336d7b23c20605a1141188d62c0461ed3 /lib/megaco/test/megaco_test_lib.erl
parentd2c7d9ffb3ceffdb324ce93fc2ea2f442f12c1fe (diff)
parent6de586ffb9bbc60b15e64a0b9696140093b925f1 (diff)
downloadotp-fab2332f524c81a3e0186928cf3b64ee3190e259.tar.gz
otp-fab2332f524c81a3e0186928cf3b64ee3190e259.tar.bz2
otp-fab2332f524c81a3e0186928cf3b64ee3190e259.zip
Merge branch 'bmk/megaco/flex_scanner_core/seq12263' into bmk/megaco/flex_buffer_overrun_while_scanning_prop_parms/OTP-10998/r13
Conflicts: lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
Diffstat (limited to 'lib/megaco/test/megaco_test_lib.erl')
-rw-r--r--lib/megaco/test/megaco_test_lib.erl41
1 files changed, 35 insertions, 6 deletions
diff --git a/lib/megaco/test/megaco_test_lib.erl b/lib/megaco/test/megaco_test_lib.erl
index 03c04831e8..55eee97443 100644
--- a/lib/megaco/test/megaco_test_lib.erl
+++ b/lib/megaco/test/megaco_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -114,7 +114,7 @@ os_based_skip(_) ->
tickets(Case) ->
Res = lists:flatten(tickets(Case, default_config())),
- %% io:format("Res: ~p~n", [Res]),
+ %% io:format("~w:tickets(Case = ~w) -> Res: ~p~n", [?MODULE, Case, Res]),
display_result(Res),
Res.
@@ -122,16 +122,25 @@ tickets(Cases, Config) when is_list(Cases) ->
[tickets(Case, Config) || Case <- Cases];
tickets(Mod, Config) when is_atom(Mod) ->
Res = tickets(Mod, tickets, Config),
+ %% io:format("~w:tickets(Mod = ~w) -> Res: ~p~n", [?MODULE, Mod, Res]),
Res;
tickets(Bad, _Config) ->
[{badarg, Bad, ok}].
tickets(Mod, Func, Config) ->
+ %% io:format("~w:tickets -> entry with"
+ %% "~n Mod: ~p"
+ %% "~n Func: ~p"
+ %% "~n Config: ~p"
+ %% "~n", [?MODULE, Mod, Func, Config]),
case (catch Mod:Func(suite)) of
[] ->
io:format("Eval: ~p:", [{Mod, Func}]),
Res = eval(Mod, Func, Config),
- {R, _, _} = Res,
+ %% io:format("~w:tickets -> evaluated"
+ %% "~n Res: ~p"
+ %% "~n", [?MODULE, Res]),
+ {R, _, _, _} = Res,
io:format(" ~p~n", [R]),
Res;
@@ -147,17 +156,37 @@ tickets(Mod, Func, Config) ->
lists:map(Map, Cases);
{req, _, {conf, Init, Cases, Finish}} ->
+ %% io:format("~w:tickets -> suite result req-conf: "
+ %% "~n Init: ~p"
+ %% "~n Cases: ~p"
+ %% "~n Finish: ~p"
+ %% "~n", [?MODULE, Init, Cases, Finish]),
case (catch Mod:Init(Config)) of
Conf when is_list(Conf) ->
io:format("Expand: ~p:~p ...~n", [Mod, Func]),
Map = fun({M,_}) when is_atom(M) ->
- tickets(M, tickets, Config);
+ %% io:format("~w:tickets -> "
+ %% "~n M: ~p"
+ %% "~n", [?MODULE, M]),
+ tickets(M, tickets, Conf);
(F) when is_atom(F) ->
- tickets(Mod, F, Config);
- (Case) -> Case
+ %% io:format("~w:tickets -> "
+ %% "~n F: ~p"
+ %% "~n", [?MODULE, F]),
+ tickets(Mod, F, Conf);
+ (Case) ->
+ %% io:format("~w:tickets -> "
+ %% "~n Case: ~p"
+ %% "~n", [?MODULE, Case]),
+ Case
end,
Res = lists:map(Map, Cases),
+ %% io:format("~w:tickets -> and now finish when: "
+ %% "~n Res: ~p"
+ %% "~n", [?MODULE, Res]),
(catch Mod:Finish(Conf)),
+ %% io:format("~w:tickets -> finished"
+ %% "~n", [?MODULE]),
Res;
{'EXIT', {skipped, Reason}} ->