diff options
author | Andrzej Telezynski <[email protected]> | 2011-08-24 23:56:37 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-08-30 15:22:20 +0200 |
commit | 1924817788f381da1b8356e336d62f4687717ee4 (patch) | |
tree | 647e0645e61e5ed472bb48ae280f61ac60449f76 /lib/observer/test/ttb_helper.erl | |
parent | f7dc3bf45367fb22ababb85a783c2e9e9a1ada00 (diff) | |
download | otp-1924817788f381da1b8356e336d62f4687717ee4.tar.gz otp-1924817788f381da1b8356e336d62f4687717ee4.tar.bz2 otp-1924817788f381da1b8356e336d62f4687717ee4.zip |
More robust testing of tracing with 'local' option.
Diffstat (limited to 'lib/observer/test/ttb_helper.erl')
-rw-r--r-- | lib/observer/test/ttb_helper.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/observer/test/ttb_helper.erl b/lib/observer/test/ttb_helper.erl index 3885812ba1..570ce934ab 100644 --- a/lib/observer/test/ttb_helper.erl +++ b/lib/observer/test/ttb_helper.erl @@ -7,7 +7,7 @@ %%msgs(N) -> N times client:put(test_msg) %%clear() -> restart server %%ensure_running() / stop() -> start/stop nodes -%%node(atom) -> return atom@hostname +%%get_node(atom) -> return atom@hostname -define(NODE_CMD(Name), "erl -sname " ++ atom_to_list(Name) ++ @@ -65,7 +65,12 @@ stop() -> msgs(N) -> [c(client, put, [test_msg]) || _ <- lists:seq(1, N)], s(server, received, [a,b]), - [dbg:flush_trace_port(Node) || Node <- [client@ariel, server@ariel]]. + [dbg:flush_trace_port(Node) || Node <- [get_node(client), get_node(server)]]. + +msgs_ip(N) -> + [c(client, put, [test_msg]) || _ <- lists:seq(1, N)], + s(server, received, [a,b]), + timer:sleep(100). %% allow trace messages to arrive over tcp/ip run() -> ttb({local, "A"}), @@ -87,7 +92,7 @@ trace_setup() -> ttb() -> ttb("A"). ttb(File) -> - ttb:tracer([server@ariel, client@ariel], [{file, File}, resume]), + ttb:tracer([get_node(client), get_node(server)], [{file, File}, resume]), ttb:p(all, [call, timestamp]), ttb:tp(client, put, []), ttb:tp(client, get, []), @@ -116,7 +121,7 @@ show_handler() -> {fun(A,B,_,_) -> io:format(A, "~p~n", [B]) end, []}. opts() -> - [[client@ariel, server@ariel], + [[get_node(client), get_node(server)], [{server, received, '_', []}, {client, put, '_', []}, {client, get, '_', []}], |