aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/doc/src/ct_slave.xml139
-rw-r--r--lib/common_test/test/Makefile1
-rw-r--r--lib/common_test/test/ct_repeat_1_SUITE.erl23
3 files changed, 162 insertions, 1 deletions
diff --git a/lib/common_test/doc/src/ct_slave.xml b/lib/common_test/doc/src/ct_slave.xml
new file mode 100644
index 0000000000..4533de92f7
--- /dev/null
+++ b/lib/common_test/doc/src/ct_slave.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+<erlref>
+<header>
+<title>ct_slave</title>
+<prepared></prepared>
+<responsible></responsible>
+<docno>1</docno>
+<approved></approved>
+<checked></checked>
+<date></date>
+<rev>A</rev>
+<file>ct_slave.xml</file></header>
+<module>ct_slave</module>
+<modulesummary>Common Test Framework functions for starting and stopping nodes for
+Large Scale Testing.</modulesummary>
+<description>
+<p>Common Test Framework functions for starting and stopping nodes for
+Large Scale Testing.</p>
+
+ <p>This module exports functions which are used by the Common Test Master
+ to start and stop "slave" nodes. It is the default callback module for the
+ <c>{init, node_start}</c> term of the Test Specification.</p></description>
+<funcs>
+<func>
+<name>start(Node) -&gt; Result</name>
+<fsummary>Starts an Erlang node with name Node on the local host.</fsummary>
+<type>
+<v>Node = atom()</v><v>Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_timeout, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName}</v><v>NodeName = atom()</v></type>
+<desc><marker id="start-1"/>
+
+<p>Starts an Erlang node with name <c>Node</c> on the local host.</p>
+<p><em>See also:</em> <seealso marker="#start-3">start/3</seealso>.</p>
+</desc></func>
+<func>
+<name>start(Host, Node) -&gt; Result</name>
+<fsummary>Starts an Erlang node with name Node on host
+ Host with the default options.</fsummary>
+<type>
+<v>Node = atom()</v><v>Host = atom()</v><v>Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_timeout, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName}</v><v>NodeName = atom()</v></type>
+<desc><marker id="start-2"/>
+
+<p>Starts an Erlang node with name <c>Node</c> on host
+ <c>Host</c> with the default options.</p>
+<p><em>See also:</em> <seealso marker="#start-3">start/3</seealso>.</p>
+</desc></func>
+<func>
+<name>start(Host, Node, Options::Opts) -&gt; Result</name>
+<fsummary>Starts an Erlang node with name Node on host
+ Host as specified by the combination of options in
+ Opts.</fsummary>
+<type>
+<v>Node = atom()</v><v>Host = atom()</v><v>Opts = [OptTuples]</v><v>OptTuples = {username, Username} | {password, Password} | {boot_timeout, BootTimeout} | {init_timeout, InitTimeout} | {startup_timeout, StartupTimeout} | {startup_functions, StartupFunctions} | {monitor_master, Monitor} | {kill_if_fail, KillIfFail} | {erl_flags, ErlangFlags}</v><v>Username = string()</v><v>Password = string()</v><v>BootTimeout = integer()</v><v>InitTimeout = integer()</v><v>StartupTimeout = integer()</v><v>StartupFunctions = [StartupFunctionSpec]</v><v>StartupFunctionSpec = {Module, Function, Arguments}</v><v>Module = atom()</v><v>Function = atom()</v><v>Arguments = [term]</v><v>Monitor = bool()</v><v>KillIfFail = bool()</v><v>ErlangFlags = string()</v><v>Result = {ok, NodeName} | {error, already_started, NodeName} | {error, started_not_connected, NodeName} | {error, boot_timeout, NodeName} | {error, init_timeout, NodeName} | {error, startup_timeout, NodeName} | {error, not_alive, NodeName}</v><v>NodeName = atom()</v></type>
+<desc><marker id="start-3"/>
+
+<p>Starts an Erlang node with name <c>Node</c> on host
+ <c>Host</c> as specified by the combination of options in
+ <c>Opts</c>.</p>
+
+ <p>Options <c>Username</c> and <c>Password</c> will be used
+ to log in onto the remote host <c>Host</c>.
+ Username, if omitted, defaults to the current user name,
+ and password is empty by default.</p>
+
+ <p>A list of functions specified in the <c>Startup</c> option will be
+ executed after startup of the node. Note that all used modules should be
+ present in the code path on the <c>Host</c>.</p>
+
+ <p>The timeouts are applied as follows:
+ <list>
+ <item>
+ <c>BootTimeout</c> - time to start the Erlang node, in seconds.
+ Defaults to 3 seconds. If node does not become pingable within this time,
+ the result <c>{error, boot_timeout, NodeName}</c> is returned;
+ </item>
+ <item>
+ <c>InitTimeout</c> - time to wait for the node until it calls the
+ internal callback function informing master about successfull startup.
+ Defaults to one second.
+ In case of timed out message the result
+ <c>{error, init_timeout, NodeName}</c> is returned;
+ </item>
+ <item>
+ <c>StartupTimeout</c> - time to wait intil the node finishes to run
+ the <c>StartupFunctions</c>. Defaults to one second.
+ If this timeout occurs, the result
+ <c>{error, startup_timeout, NodeName}</c> is returned.
+ </item>
+ </list></p>
+
+ <p>Option <c>monitor_master</c> specifies, if the slave node should be
+ stopped in case of master node stop. Defaults to false.</p>
+
+ <p>Option <c>kill_if_fail</c> specifies, if the slave node should be
+ killed in case of a timeout during initialization or startup.
+ Defaults to true. Note that node also may be still alive it the boot
+ timeout occurred, but it will not be killed in this case.</p>
+
+ <p>Option <c>erlang_flags</c> specifies, which flags will be added
+ to the parameters of the <c>erl</c> executable.</p>
+
+ <p>Special return values are:
+ <list>
+ <item><c>{error, already_started, NodeName}</c> - if the node with
+ the given name is already started on a given host;</item>
+ <item><c>{error, started_not_connected, NodeName}</c> - if node is
+ started, but not connected to the master node.</item>
+ <item><c>{error, not_alive, NodeName}</c> - if node on which the
+ <c>ct_slave:start/3</c> is called, is not alive. Note that
+ <c>NodeName</c> is the name of current node in this case.</item>
+ </list></p>
+
+</desc></func>
+<func>
+<name>stop(Node) -&gt; Result</name>
+<fsummary>Stops the running Erlang node with name Node on
+ the localhost.</fsummary>
+<type>
+<v>Node = atom()</v><v>Result = {ok, NodeName} | {error, not_started, NodeName} | {error, not_connected, NodeName} | {error, stop_timeout, NodeName}</v><v>NodeName = atom()</v></type>
+<desc><marker id="stop-1"/>
+
+<p>Stops the running Erlang node with name <c>Node</c> on
+ the localhost.</p>
+</desc></func>
+<func>
+<name>stop(Host, Node) -&gt; Result</name>
+<fsummary>Stops the running Erlang node with name Node on
+ host Host.</fsummary>
+<type>
+<v>Host = atom()</v><v>Node = atom()</v><v>Result = {ok, NodeName} | {error, not_started, NodeName} | {error, not_connected, NodeName} | {error, stop_timeout, NodeName}</v><v>NodeName = atom()</v></type>
+<desc><marker id="stop-2"/>
+
+<p>Stops the running Erlang node with name <c>Node</c> on
+ host <c>Host</c>.</p>
+</desc></func></funcs>
+
+<authors>
+<aname> </aname>
+<email> </email></authors></erlref> \ No newline at end of file
diff --git a/lib/common_test/test/Makefile b/lib/common_test/test/Makefile
index abb14c35d9..b96bdef5e0 100644
--- a/lib/common_test/test/Makefile
+++ b/lib/common_test/test/Makefile
@@ -33,6 +33,7 @@ MODULES= \
ct_groups_test_1_SUITE \
ct_groups_test_2_SUITE \
ct_sequence_1_SUITE \
+ ct_repeat_1_SUITE \
ct_testspec_1_SUITE \
ct_skip_SUITE \
ct_error_SUITE \
diff --git a/lib/common_test/test/ct_repeat_1_SUITE.erl b/lib/common_test/test/ct_repeat_1_SUITE.erl
index 2956f6a8ad..558cb731c9 100644
--- a/lib/common_test/test/ct_repeat_1_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_1_SUITE.erl
@@ -182,5 +182,26 @@ events_to_check(_, 0) ->
events_to_check(Test, N) ->
test_events(Test) ++ events_to_check(Test, N-1).
-test_events(_) ->
+test_events(repeat_cs) ->
+ [];
+
+test_events(repeat_cs_and_grs) ->
+ [];
+
+test_events(repeat_seq_1) ->
+ [];
+
+test_events(repeat_seq_2) ->
+ [];
+
+test_events(repeat_cs_until_any_ok) ->
+ [];
+
+test_events(repeat_cs_until_any_fail) ->
+ [];
+
+test_events(repeat_cs_until_all_ok) ->
+ [];
+
+test_events(repeat_cs_until_all_fail) ->
[].