aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-10-13 14:01:09 +0200
committerHans Bolinder <[email protected]>2015-12-09 13:05:31 +0100
commit646e1b9e6a836526865f15582bb22c600c54d26a (patch)
tree62eb0752ae7b271ad94c0b96a15d292b493b89bf
parent9d80569b209d37f711ca55c4673d8dd8fbf614fa (diff)
downloadotp-646e1b9e6a836526865f15582bb22c600c54d26a.tar.gz
otp-646e1b9e6a836526865f15582bb22c600c54d26a.tar.bz2
otp-646e1b9e6a836526865f15582bb22c600c54d26a.zip
[common_test] Correct documentation
Fix mistakes found by 'xmllint'.
-rw-r--r--lib/common_test/doc/src/ct_hooks_chapter.xml20
-rw-r--r--lib/common_test/doc/src/event_handler_chapter.xml5
-rw-r--r--lib/common_test/doc/src/notes.xml21
-rw-r--r--lib/common_test/src/ct_slave.erl10
-rw-r--r--lib/common_test/src/ct_snmp.erl18
-rw-r--r--lib/common_test/src/ct_telnet.erl12
6 files changed, 42 insertions, 44 deletions
diff --git a/lib/common_test/doc/src/ct_hooks_chapter.xml b/lib/common_test/doc/src/ct_hooks_chapter.xml
index d9892c66f7..3905e23dcc 100644
--- a/lib/common_test/doc/src/ct_hooks_chapter.xml
+++ b/lib/common_test/doc/src/ct_hooks_chapter.xml
@@ -30,8 +30,8 @@
<file>ct_hooks_chapter.xml</file>
</header>
- <marker id="general"></marker>
<section>
+ <marker id="general"></marker>
<title>General</title>
<p>
The <em>Common Test Hook</em> (henceforth called CTH) framework allows
@@ -60,8 +60,8 @@
</section>
- <marker id="installing"></marker>
<section>
+ <marker id="installing"></marker>
<title>Installing a CTH</title>
<p>There are multiple ways to install a CTH in your test run. You can do it
for all tests in a run, for specific test suites and for specific groups
@@ -120,8 +120,8 @@
</section>
</section>
- <marker id="scope"/>
<section>
+ <marker id="scope"/>
<title>CTH Scope</title>
<p>Once the CTH is installed into a certain test run it will be there until
its scope is expired. The scope of a CTH depends on when it is
@@ -208,8 +208,8 @@
</section>
- <marker id="manipulating"/>
<section>
+ <marker id="manipulating"/>
<title>Manipulating tests</title>
<p>It is through CTHs possible to manipulate the results of tests and
configuration functions. The main purpose of doing this with CTHs is to
@@ -226,8 +226,8 @@
makes it possible to use hooks as configuration fallbacks, or even
completely replace all configuration functions with hook functions.</p>
- <marker id="pre"/>
<section>
+ <marker id="pre"/>
<title>Pre Hooks</title>
<p>
It is possible in a CTH to hook in behaviour before
@@ -263,8 +263,8 @@
</section>
- <marker id="post"/>
<section>
+ <marker id="post"/>
<title>Post Hooks</title>
<p>It is also possible in a CTH to hook in behaviour after
<seealso marker="common_test#Module:init_per_suite-1">init_per_suite</seealso>,
@@ -308,8 +308,8 @@ post_end_per_testcase(_TC, Config, Return, CTHState) -&gt;
</section>
- <marker id="skip_n_fail"/>
<section>
+ <marker id="skip_n_fail"/>
<title>Skip and Fail hooks</title>
<p>
After any post hook has been executed for all installed CTHs,
@@ -323,8 +323,8 @@ post_end_per_testcase(_TC, Config, Return, CTHState) -&gt;
</section>
- <marker id="synchronizing"/>
<section>
+ <marker id="synchronizing"/>
<title>Synchronizing external user applications with Common Test</title>
<p>CTHs can be used to synchronize test runs with external user applications.
The init function may e.g. start and/or communicate with an application that
@@ -351,8 +351,8 @@ post_end_per_testcase(_TC, Config, Return, CTHState) -&gt;
</p>
</section>
- <marker id="example"/>
<section>
+ <marker id="example"/>
<title>Example CTH</title>
<p>The CTH below will log information about a test run into a format
parseable by <seealso marker="kernel:file#consult-1">file:consult/1</seealso>.
@@ -455,8 +455,8 @@ terminate(State) ->
ok.</code>
</section>
- <marker id="builtin_cths"/>
<section>
+ <marker id="builtin_cths"/>
<title>Built-in CTHs</title>
<p>Common Test is delivered with a couple of general purpose CTHs that
can be enabled by the user to provide some generic testing functionality.
diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml
index cb7033b196..78e5bb5e70 100644
--- a/lib/common_test/doc/src/event_handler_chapter.xml
+++ b/lib/common_test/doc/src/event_handler_chapter.xml
@@ -194,8 +194,9 @@
the current test case log file.
</p></item>
- <marker id="tc_done"/>
- <item><c>#event{name = tc_done, data = {Suite,FuncOrGroup,Result}}</c>
+ <item>
+ <marker id="tc_done"/>
+ <c>#event{name = tc_done, data = {Suite,FuncOrGroup,Result}}</c>
<p><c>Suite = atom()</c>, name of the suite.</p>
<p><c>FuncOrGroup = Func | {Conf,GroupName,GroupProperties}</c></p>
<p><c>Func = atom()</c>, name of test case or configuration function.</p>
diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml
index aaf6dffc88..6972d18dfc 100644
--- a/lib/common_test/doc/src/notes.xml
+++ b/lib/common_test/doc/src/notes.xml
@@ -760,7 +760,7 @@
configuration function or test specification term), the
affected test cases get the status <c>user_skipped</c>
instead.</p> <p>This update has meant a few changes that
- may affect Common Test users in various ways: <list>
+ may affect Common Test users in various ways:</p> <list>
<item>The test results and statistics will be affected,
which is important to know when running regression tests
and comparing results to previous test runs.</item>
@@ -780,7 +780,7 @@
<c>auto_skipped</c> rather than <c>user_skipped</c> as
before.</item> <item>The event messages that Common Test
generates during test runs have been affected by this
- update. For details see OTP-11524.</item> </list> </p>
+ update. For details see OTP-11524.</item> </list>
<p>
Own Id: OTP-11305 Aux Id: OTP-11524 </p>
</item>
@@ -831,7 +831,7 @@
<item>
<p>The following modifications have been made to the
event messages that Common Test sends during test
- execution: <list> <item>For the <c>tc_auto_skip</c>
+ execution:</p> <list> <item>For the <c>tc_auto_skip</c>
event, the value of the <c>Func</c> element has changed
from <c>end_per_group</c> to
<c>{end_per_group,GroupName}</c>.</item> <item>When
@@ -843,7 +843,7 @@
configuration name already in use, the <c>tc_done</c>
event now reports the error with a tuple (of size 2)
tagged <c>failed</c> instead of <c>skipped</c>.</item>
- </list> Please see the Event Handling chapter in the
+ </list> <p>Please see the Event Handling chapter in the
Common Test User's Guide for reference. </p>
<p>
Own Id: OTP-11524 Aux Id: OTP-11305 </p>
@@ -1247,7 +1247,6 @@
<item>
<p>
Some bugfixes in <c>ct_snmp:</c></p>
- <p>
<list> <item> ct_snmp will now use the value of the
'agent_vsns' config variable when setting the 'variables'
parameter to snmp application agent configuration.
@@ -1255,14 +1254,13 @@
supported versions had to be specified twice. </item>
<item> Snmp application failed to write notify.conf since
ct_snmp gave the notify type as a string instead of an
- atom. This has been corrected. </item> </list></p>
+ atom. This has been corrected. </item> </list>
<p>
Own Id: OTP-10432</p>
</item>
<item>
<p>
Some bugfixes in <c>ct_snmp</c>:</p>
- <p>
<list> <item> Functions <c>register_users/2</c>,
<c>register_agents/2</c> and <c>register_usm_users/2</c>,
and the corresponding <c>unregister_*/1</c> functions
@@ -1279,7 +1277,7 @@
priv_dir instead of in the configuration dir
(priv_dir/conf). This has been corrected. </item> <item>
Arguments to <c>register_usm_users/2</c> were faulty
- documented. This has been corrected. </item> </list></p>
+ documented. This has been corrected. </item> </list>
<p>
Own Id: OTP-10434 Aux Id: kunagi-264 [175] </p>
</item>
@@ -1343,7 +1341,7 @@
</item>
<item>
<p>
- Update common test modules to handle unicode <list>
+ Update common test modules to handle unicode:</p> <list>
<item> Use UTF-8 encoding for all HTML files, except the
HTML version of the test suite generated with
erl2html2:convert, which will have the same encoding as
@@ -1354,7 +1352,7 @@
unicode:characters_to_list and
unicode:characters_to_binary for conversion between
binaries and strings instead of binary_to_list and
- list_to_binary. </item> </list></p>
+ list_to_binary. </item> </list>
<p>
Own Id: OTP-10783</p>
</item>
@@ -1395,7 +1393,6 @@
<p>
The following corrections/changes are done in the
cth_surefire hook:</p>
- <p>
<list> <item> Earlier there would always be a
'properties' element under the 'testsuites' element. This
would exist even if there were no 'property' element
@@ -1428,7 +1425,7 @@
</item> <item> A new option named 'url_base' is added for
this hook. If this option is used, a new attribute named
'url' will be added to the 'testcase' and 'testsuite'
- elements. </item> </list></p>
+ elements. </item> </list>
<p>
Own Id: OTP-10589</p>
</item>
diff --git a/lib/common_test/src/ct_slave.erl b/lib/common_test/src/ct_slave.erl
index 32a1ff4dbc..0cd83b9f04 100644
--- a/lib/common_test/src/ct_slave.erl
+++ b/lib/common_test/src/ct_slave.erl
@@ -1,7 +1,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -134,7 +134,7 @@ start(Host, Node) ->
%%% executed after startup of the node. Note that all used modules should be
%%% present in the code path on the <code>Host</code>.</p>
%%%
-%%% <p>The timeouts are applied as follows:
+%%% <p>The timeouts are applied as follows:</p>
%%% <list>
%%% <item>
%%% <code>BootTimeout</code> - time to start the Erlang node, in seconds.
@@ -154,7 +154,7 @@ start(Host, Node) ->
%%% If this timeout occurs, the result
%%% <code>{error, startup_timeout, NodeName}</code> is returned.
%%% </item>
-%%% </list></p>
+%%% </list>
%%%
%%% <p>Option <code>monitor_master</code> specifies, if the slave node should be
%%% stopped in case of master node stop. Defaults to false.</p>
@@ -170,7 +170,7 @@ start(Host, Node) ->
%%% <p>Option <code>env</code> specifies a list of environment variables
%%% that will extended the environment.</p>
%%%
-%%% <p>Special return values are:
+%%% <p>Special return values are:</p>
%%% <list>
%%% <item><code>{error, already_started, NodeName}</code> - if the node with
%%% the given name is already started on a given host;</item>
@@ -179,7 +179,7 @@ start(Host, Node) ->
%%% <item><code>{error, not_alive, NodeName}</code> - if node on which the
%%% <code>ct_slave:start/3</code> is called, is not alive. Note that
%%% <code>NodeName</code> is the name of current node in this case.</item>
-%%% </list></p>
+%%% </list>
%%%
start(Host, Node, Opts) ->
ENode = enodename(Host, Node),
diff --git a/lib/common_test/src/ct_snmp.erl b/lib/common_test/src/ct_snmp.erl
index 95098bdaca..bb0167eb22 100644
--- a/lib/common_test/src/ct_snmp.erl
+++ b/lib/common_test/src/ct_snmp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
%%% @doc Common Test user interface module for the OTP snmp application
%%%
-%%% The purpose of this module is to make snmp configuration easier for
+%%% <p>The purpose of this module is to make snmp configuration easier for
%%% the test case writer. Many test cases can use default values for common
%%% operations and then no snmp configuration files need to be supplied. When
%%% it is necessary to change particular configuration parameters, a subset
@@ -31,7 +31,7 @@
%%% To simplify the test suite, Common Test keeps track
%%% of some of the snmp manager information. This way the test suite doesn't
%%% have to handle as many input parameters as it would if it had to interface the
-%%% OTP snmp manager directly.
+%%% OTP snmp manager directly.</p>
%%%
%%% <p> The following snmp manager and agent parameters are configurable: </p>
%%%
@@ -326,9 +326,9 @@ set_info(Config) ->
%%% @doc Register the manager entity (=user) responsible for specific agent(s).
%%% Corresponds to making an entry in users.conf.
%%%
-%%% This function will try to register the given users, without
+%%% <p>This function will try to register the given users, without
%%% checking if any of them already exist. In order to change an
-%%% already registered user, the user must first be unregistered.
+%%% already registered user, the user must first be unregistered.</p>
register_users(MgrAgentConfName, Users) ->
case setup_users(Users) of
ok ->
@@ -351,10 +351,10 @@ register_users(MgrAgentConfName, Users) ->
%%% @doc Explicitly instruct the manager to handle this agent.
%%% Corresponds to making an entry in agents.conf
%%%
-%%% This function will try to register the given managed agents,
+%%% <p>This function will try to register the given managed agents,
%%% without checking if any of them already exist. In order to change
%%% an already registered managed agent, the agent must first be
-%%% unregistered.
+%%% unregistered.</p>
register_agents(MgrAgentConfName, ManagedAgents) ->
case setup_managed_agents(MgrAgentConfName,ManagedAgents) of
ok ->
@@ -378,9 +378,9 @@ register_agents(MgrAgentConfName, ManagedAgents) ->
%%% @doc Explicitly instruct the manager to handle this USM user.
%%% Corresponds to making an entry in usm.conf
%%%
-%%% This function will try to register the given users, without
+%%% <p>This function will try to register the given users, without
%%% checking if any of them already exist. In order to change an
-%%% already registered user, the user must first be unregistered.
+%%% already registered user, the user must first be unregistered.</p>
register_usm_users(MgrAgentConfName, UsmUsers) ->
EngineID = ct:get_config({MgrAgentConfName, engine_id}, ?ENGINE_ID),
case setup_usm_users(UsmUsers, EngineID) of
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl
index e9487e94db..4d3fd2d094 100644
--- a/lib/common_test/src/ct_telnet.erl
+++ b/lib/common_test/src/ct_telnet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2015. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -327,16 +327,16 @@ cmd(Connection,Cmd) ->
%%% Reason = term()
%%% @doc Send a command via telnet and wait for prompt.
%%%
-%%% This function will by default add a newline to the end of the
+%%% <p>This function will by default add a newline to the end of the
%%% given command. If this is not desired, the option
%%% `{newline,false}' can be used. This is necessary, for example,
%%% when sending telnet command sequences (prefixed with the
-%%% Interprete As Command, IAC, character).
+%%% Interprete As Command, IAC, character).</p>
%%%
-%%% The option `timeout' specifies how long the client shall wait for
+%%% <p>The option `timeout' specifies how long the client shall wait for
%%% prompt. If the time expires, the function returns
%%% `{error,timeout}'. See the module description for information
-%%% about the default value for the command timeout.
+%%% about the default value for the command timeout.</p>
cmd(Connection,Cmd,Opts) when is_list(Opts) ->
case check_cmd_opts(Opts) of
ok ->
@@ -378,7 +378,7 @@ cmdf(Connection,CmdFormat,Args) ->
%%% @doc Send a telnet command and wait for prompt
%%% (uses a format string and list of arguments to build the command).
%%%
-%%% See {@link cmd/3} further description.
+%%% <p>See {@link cmd/3} further description.</p>
cmdf(Connection,CmdFormat,Args,Opts) when is_list(Args) ->
Cmd = lists:flatten(io_lib:format(CmdFormat,Args)),
cmd(Connection,Cmd,Opts).