From 2d7ba88ebbb59a473dbcefd0f9dee1f1b816935e Mon Sep 17 00:00:00 2001
From: Peter Andersson
Date: Tue, 8 Jun 2010 14:44:05 +0200
Subject: Misc documentation updates
---
lib/common_test/doc/src/event_handler_chapter.xml | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
(limited to 'lib/common_test/doc/src/event_handler_chapter.xml')
diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml
index 35b684730e..1508b7ce33 100644
--- a/lib/common_test/doc/src/event_handler_chapter.xml
+++ b/lib/common_test/doc/src/event_handler_chapter.xml
@@ -68,29 +68,27 @@
Example:
$ run_test -suite test/my_SUITE -event_handler handlers/my_evh1
handlers/my_evh2 -pa $PWD/handlers
+ Use the option instead of
+ to pass start arguments to the event handler
+ init function.
All event handler modules must have gen_event behaviour. Note also that
these modules must be precompiled, and that their locations must be
added explicitly to the Erlang code server search path (like in the
example).
- It is not possible to specify start arguments to the event handlers when
- using the run_test program. You may however pass along start arguments
- if you use the ct:run_test/1 function. An event_handler tuple in the argument
- Opts has the following definition (see also ct:run_test/1 in the
- reference manual):
+ An event_handler tuple in the argument Opts has the following
+ definition (see also ct:run_test/1 in the reference manual):
{event_handler,EventHandlers}
EventHandlers = EH | [EH]
EH = atom() | {atom(),InitArgs} | {[atom()],InitArgs}
- InitArgs = [term()]
-
+ InitArgs = [term()]
Example:
- 1> ct:run_test([{suite,"test/my_SUITE"},{event_handler,[my_evh1,{my_evh2,[node()]}]}]).
-
+ 1> ct:run_test([{suite,"test/my_SUITE"},{event_handler,[my_evh1,{my_evh2,[node()]}]}]).
This will install two event handlers for the my_SUITE test. Event handler
my_evh1 is started with [] as argument to the init function. Event handler
my_evh2 is started with the name of the current node in the init argument list.
--
cgit v1.2.3