@@ -36,11 +36,11 @@ new() ->
3636 rt_trace_tab = ets :new (rt_trace_tab , [named_table ]).
3737
3838set_tracing_applied (TracingApplied ) when is_boolean (TracingApplied ) ->
39- lager :info (" Setting apply tracing to ~p " , [TracingApplied ]),
39+ lager :info (" Setting apply tracing to ~p " , [TracingApplied ]),
4040 ets :insert (rt_trace_tab , {apply_traces ,TracingApplied }).
4141
4242is_tracing_applied () ->
43- (catch ets :lookup_element (rt_trace_tab , apply_traces , 2 )) == true .
43+ (catch ets :lookup_element (rt_trace_tab , apply_traces , 2 )) == true .
4444
4545% % Apply traces to one or more nodes using redbug tracing and syntax.
4646% %
@@ -63,48 +63,48 @@ is_tracing_applied() ->
6363% % the test cluster. This is important if there are multiple tests in the same
6464% % suite, but not if the cluster is torn down at the end of the suite.
6565trace (Nodes , TraceStrings ) ->
66- trace (Nodes , TraceStrings , []).
66+ trace (Nodes , TraceStrings , []).
6767
6868trace (Nodes , TraceStrings , Options1 ) when (is_atom (Nodes ) orelse is_list (Nodes )) ->
69- case is_tracing_applied () of
70- true ->
71- Options2 = apply_options_to_defaults (Options1 ),
72- [apply_trace (N , TraceStrings , Options2 ) || N <- ensure_list (Nodes )],
73- ok ;
74- false ->
75- ok
76- end .
69+ case is_tracing_applied () of
70+ true ->
71+ Options2 = apply_options_to_defaults (Options1 ),
72+ [apply_trace (N , TraceStrings , Options2 ) || N <- ensure_list (Nodes )],
73+ ok ;
74+ false ->
75+ ok
76+ end .
7777
7878% %
7979apply_trace (Node , TraceString , Options ) ->
80- rpc :call (Node , redbug , start , [TraceString , Options ]).
80+ rpc :call (Node , redbug , start , [TraceString , Options ]).
8181
8282% %
8383apply_options_to_defaults (Options ) ->
84- lists :foldl (
85- fun ({K ,_ } = E ,Acc ) ->
86- lists :keystore (K , 1 , Acc , E )
87- end , default_trace_options (), Options ).
84+ lists :foldl (
85+ fun ({K ,_ } = E ,Acc ) ->
86+ lists :keystore (K , 1 , Acc , E )
87+ end , default_trace_options (), Options ).
8888
8989% %
9090default_trace_options () ->
91- [
92- % % default ct timeout of 30 minutes
93- % % http://erlang.org/doc/apps/common_test/write_test_chapter.html#id77922
94- {time ,(30 * 60 * 1000 )}
95- ].
91+ [
92+ % % default ct timeout of 30 minutes
93+ % % http://erlang.org/doc/apps/common_test/write_test_chapter.html#id77922
94+ {time ,(30 * 60 * 1000 )}
95+ ].
9696
9797% % Stop redbug tracing on a node or list of nodes
9898stop (Nodes ) ->
99- case is_tracing_applied () of
100- true ->
101- [rpc :call (N , redbug , stop , []) || N <- ensure_list (Nodes )],
102- ok ;
103- false ->
104- ok
105- end .
99+ case is_tracing_applied () of
100+ true ->
101+ [rpc :call (N , redbug , stop , []) || N <- ensure_list (Nodes )],
102+ ok ;
103+ false ->
104+ ok
105+ end .
106106
107107% % Doesn't work on lists of strings!
108108ensure_list (V ) ->
109- lists :flatten ([V ]).
109+ lists :flatten ([V ]).
110110
0 commit comments