diff options
author | Peter Andersson <[email protected]> | 2010-06-08 14:44:05 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-09 16:19:27 +0200 |
commit | 2d7ba88ebbb59a473dbcefd0f9dee1f1b816935e (patch) | |
tree | bb472fd9dc9b9437dc58a62c183d569480e9eafd /lib/common_test/doc/src/event_handler_chapter.xml | |
parent | aef5c74eba885b7c28d310b4a2522de854012e33 (diff) | |
download | otp-2d7ba88ebbb59a473dbcefd0f9dee1f1b816935e.tar.gz otp-2d7ba88ebbb59a473dbcefd0f9dee1f1b816935e.tar.bz2 otp-2d7ba88ebbb59a473dbcefd0f9dee1f1b816935e.zip |
Misc documentation updates
Diffstat (limited to 'lib/common_test/doc/src/event_handler_chapter.xml')
-rw-r--r-- | lib/common_test/doc/src/event_handler_chapter.xml | 16 |
1 files changed, 7 insertions, 9 deletions
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:</p> <p><c>$ run_test -suite test/my_SUITE -event_handler handlers/my_evh1 handlers/my_evh2 -pa $PWD/handlers</c></p> + <p>Use the <c><![CDATA[run_test -event_handler_init]]></c> option instead of + <c><![CDATA[-event_handler]]></c> to pass start arguments to the event handler + init function.</p> <p>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).</p> - <p>It is not possible to specify start arguments to the event handlers when - using the <c>run_test</c> program. You may however pass along start arguments - if you use the <c>ct:run_test/1</c> function. An event_handler tuple in the argument - <c>Opts</c> has the following definition (see also <c>ct:run_test/1</c> in the - reference manual):</p> + <p>An event_handler tuple in the argument <c>Opts</c> has the following + definition (see also <c>ct:run_test/1</c> in the reference manual):</p> <pre> {event_handler,EventHandlers} EventHandlers = EH | [EH] EH = atom() | {atom(),InitArgs} | {[atom()],InitArgs} - InitArgs = [term()] - </pre> + InitArgs = [term()]</pre> <p>Example:</p> <pre> - 1> ct:run_test([{suite,"test/my_SUITE"},{event_handler,[my_evh1,{my_evh2,[node()]}]}]). - </pre> + 1> ct:run_test([{suite,"test/my_SUITE"},{event_handler,[my_evh1,{my_evh2,[node()]}]}]).</pre> <p>This will install two event handlers for the <c>my_SUITE</c> test. Event handler <c>my_evh1</c> is started with <c>[]</c> as argument to the init function. Event handler <c>my_evh2</c> is started with the name of the current node in the init argument list.</p> |