aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-10-26 15:21:17 +0200
committerBjörn Gustavsson <[email protected]>2012-10-31 12:09:09 +0100
commitcaad6a814e6eddf66f747c646acbfaf8450b1a1f (patch)
tree655fbdeeae684f9d60d7a01fa53be01baad0ae35
parenta8b2ba096dc48a29af52fd68070089d4bbb37483 (diff)
downloadotp-caad6a814e6eddf66f747c646acbfaf8450b1a1f.tar.gz
otp-caad6a814e6eddf66f747c646acbfaf8450b1a1f.tar.bz2
otp-caad6a814e6eddf66f747c646acbfaf8450b1a1f.zip
Add ct_test_support:verify_events/4 which takes a node name
-rw-r--r--lib/common_test/test/ct_test_support.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 80cca4a1cc..48c6e1c0ed 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -32,7 +32,7 @@
run/2, run/3, run/4, get_opts/1, wait_for_ct_stop/1]).
-export([handle_event/2, start_event_receiver/1, get_events/2,
- verify_events/3, reformat/2, log_events/4,
+ verify_events/3, verify_events/4, reformat/2, log_events/4,
join_abs_dirs/2]).
-export([ct_test_halt/1]).
@@ -364,6 +364,14 @@ verify_events(TEvs, Evs, Config) ->
ok
end.
+verify_events(TEvs, Evs, Node, Config) ->
+ case catch verify_events1(TEvs, Evs, Node, Config) of
+ {'EXIT',Reason} ->
+ Reason;
+ _ ->
+ ok
+ end.
+
verify_events1([TestEv|_], [{TEH,#event{name=stop_logging,node=Node,data=_}}|_], Node, _)
when element(1,TestEv) == TEH, element(2,TestEv) =/= stop_logging ->
test_server:format("Failed to find ~p in the list of events!~n", [TestEv]),