diff options
author | Andrey Pampukha <[email protected]> | 2010-04-15 12:57:04 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-09 16:19:18 +0200 |
commit | ebcab814cabc74407f48aba1b41327df80586fcd (patch) | |
tree | 3023608d015d9bc840c6d3b5f59ecabd4ba0ee8b /lib/common_test/doc/src/ct_master_chapter.xml | |
parent | 2daac36809c14007d179a118784f48ceb79a30d1 (diff) | |
download | otp-ebcab814cabc74407f48aba1b41327df80586fcd.tar.gz otp-ebcab814cabc74407f48aba1b41327df80586fcd.tar.bz2 otp-ebcab814cabc74407f48aba1b41327df80586fcd.zip |
Document ct_slave and 'eval' terms
Diffstat (limited to 'lib/common_test/doc/src/ct_master_chapter.xml')
-rw-r--r-- | lib/common_test/doc/src/ct_master_chapter.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/common_test/doc/src/ct_master_chapter.xml b/lib/common_test/doc/src/ct_master_chapter.xml index 79288cfe4c..1622b5b29c 100644 --- a/lib/common_test/doc/src/ct_master_chapter.xml +++ b/lib/common_test/doc/src/ct_master_chapter.xml @@ -194,6 +194,37 @@ current working directory settings are not important.</p></note> </section> + <section> + <title>Automatic startup of the test target nodes</title> + <marker id="ct_slave"></marker> + <p>Is is possible to start nodes acting like a test targets automatically + using a new term in the test specification, <c>node_start</c>:</p> + <pre> + {node, node1, node1@host1}. + {node, node2, node1@host2}. + {node, node3, node2@host2}. + {node_start, node1, [{callback_module, my_slave_callback}]}. + {node_start, [node2, node3], [{username, "ct_user"}, {password, "ct_password"}]}. + </pre> + <p>This test specification declares that <c>node1@host1</c> is to be started using + user's callback <c>my_slave_callback</c> with no parameters, and nodes <c>node1@host2</c> and + <c>node2@host2</c> will be started with the default callback module <c>ct_slave</c>, + using the given user name and password to log into remote host <c>host2</c>.</p> + <p>Default <seealso marker="ct_slave">ct_slave</seealso> callback module delivered with the Common Test has the following features: + <list> + <item>Starting the Erlang nodes or local or remote hosts (ssh is used for remote ones);</item> + <item>Ability to start Erlang emulator with the additional flags (any flags supported by <c>erl</c> are supported);</item> + <item>Supervision of the node being start using internal callback functions. Used to prevent hanging of started nodes. Configurable;</item> + <item>Monitoring of the master node by the slaves. Slave node may be stopped in case of master node termination. Configurable;</item> + <item>Execution of the user's functions after slave node is started. Functions can be given as a list of {Module, Function, Arguments} tuples.</item> + </list> + </p> + <p>If any <c>eval</c> term is specified for a node which has <c>node_start</c> term + defined for it, the evaluation of the functions will be deferred until the node is started. + The functions to be evaluated are simply added to the end of the <c>startup_functions</c> list + (see <seealso marker="ct_slave">ct_slave</seealso> chapter in the Reference Manual).</p> + </section> + </chapter> |