From 646e1b9e6a836526865f15582bb22c600c54d26a Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 13 Oct 2015 14:01:09 +0200 Subject: [common_test] Correct documentation Fix mistakes found by 'xmllint'. --- lib/common_test/doc/src/ct_hooks_chapter.xml | 20 ++++++++++---------- lib/common_test/doc/src/event_handler_chapter.xml | 5 +++-- lib/common_test/doc/src/notes.xml | 21 +++++++++------------ lib/common_test/src/ct_slave.erl | 10 +++++----- lib/common_test/src/ct_snmp.erl | 18 +++++++++--------- lib/common_test/src/ct_telnet.erl | 12 ++++++------ 6 files changed, 42 insertions(+), 44 deletions(-) (limited to 'lib/common_test') 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 @@ ct_hooks_chapter.xml -
+ General

The Common Test Hook (henceforth called CTH) framework allows @@ -60,8 +60,8 @@

-
+ Installing a CTH

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 @@

-
+ CTH Scope

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 @@

-
+ Manipulating tests

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.

-
+ Pre Hooks

It is possible in a CTH to hook in behaviour before @@ -263,8 +263,8 @@

-
+ Post Hooks

It is also possible in a CTH to hook in behaviour after init_per_suite, @@ -308,8 +308,8 @@ post_end_per_testcase(_TC, Config, Return, CTHState) ->

-
+ Skip and Fail hooks

After any post hook has been executed for all installed CTHs, @@ -323,8 +323,8 @@ post_end_per_testcase(_TC, Config, Return, CTHState) ->

-
+ Synchronizing external user applications with Common Test

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) ->

-
+ Example CTH

The CTH below will log information about a test run into a format parseable by file:consult/1. @@ -455,8 +455,8 @@ terminate(State) -> ok.

-
+ Built-in CTHs

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.

- - #event{name = tc_done, data = {Suite,FuncOrGroup,Result}} + + + #event{name = tc_done, data = {Suite,FuncOrGroup,Result}}

Suite = atom(), name of the suite.

FuncOrGroup = Func | {Conf,GroupName,GroupProperties}

Func = atom(), name of test case or configuration function.

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 user_skipped instead.

This update has meant a few changes that - may affect Common Test users in various ways: + may affect Common Test users in various ways:

The test results and statistics will be affected, which is important to know when running regression tests and comparing results to previous test runs. @@ -780,7 +780,7 @@ auto_skipped rather than user_skipped as before.
The event messages that Common Test generates during test runs have been affected by this - update. For details see OTP-11524.

+ update. For details see OTP-11524.

Own Id: OTP-11305 Aux Id: OTP-11524

@@ -831,7 +831,7 @@

The following modifications have been made to the event messages that Common Test sends during test - execution: For the tc_auto_skip + execution:

For the tc_auto_skip event, the value of the Func element has changed from end_per_group to {end_per_group,GroupName}. When @@ -843,7 +843,7 @@ configuration name already in use, the tc_done event now reports the error with a tuple (of size 2) tagged failed instead of skipped. - Please see the Event Handling chapter in the +

Please see the Event Handling chapter in the Common Test User's Guide for reference.

Own Id: OTP-11524 Aux Id: OTP-11305

@@ -1247,7 +1247,6 @@

Some bugfixes in ct_snmp:

-

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. 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.

+ atom. This has been corrected.

Own Id: OTP-10432

Some bugfixes in ct_snmp:

-

Functions register_users/2, register_agents/2 and register_usm_users/2, and the corresponding unregister_*/1 functions @@ -1279,7 +1277,7 @@ priv_dir instead of in the configuration dir (priv_dir/conf). This has been corrected. Arguments to register_usm_users/2 were faulty - documented. This has been corrected.

+ documented. This has been corrected.

Own Id: OTP-10434 Aux Id: kunagi-264 [175]

@@ -1343,7 +1341,7 @@

- Update common test modules to handle unicode + Update common test modules to handle unicode:

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.

+ list_to_binary.

Own Id: OTP-10783

@@ -1395,7 +1393,6 @@

The following corrections/changes are done in the cth_surefire hook:

-

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 @@ 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.

+ elements.

Own Id: OTP-10589

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 Host.

%%% -%%%

The timeouts are applied as follows: +%%%

The timeouts are applied as follows:

%%% %%% %%% BootTimeout - time to start the Erlang node, in seconds. @@ -154,7 +154,7 @@ start(Host, Node) -> %%% If this timeout occurs, the result %%% {error, startup_timeout, NodeName} is returned. %%% -%%%

+%%% %%% %%%

Option monitor_master specifies, if the slave node should be %%% stopped in case of master node stop. Defaults to false.

@@ -170,7 +170,7 @@ start(Host, Node) -> %%%

Option env specifies a list of environment variables %%% that will extended the environment.

%%% -%%%

Special return values are: +%%%

Special return values are:

%%% %%% {error, already_started, NodeName} - if the node with %%% the given name is already started on a given host; @@ -179,7 +179,7 @@ start(Host, Node) -> %%% {error, not_alive, NodeName} - if node on which the %%% ct_slave:start/3 is called, is not alive. Note that %%% NodeName is the name of current node in this case. -%%%

+%%% %%% 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 +%%%

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.

%%% %%%

The following snmp manager and agent parameters are configurable:

%%% @@ -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 +%%%

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.

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, +%%%

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.

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 +%%%

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.

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 +%%%

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).

%%% -%%% The option `timeout' specifies how long the client shall wait for +%%%

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.

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. +%%%

See {@link cmd/3} further description.

cmdf(Connection,CmdFormat,Args,Opts) when is_list(Args) -> Cmd = lists:flatten(io_lib:format(CmdFormat,Args)), cmd(Connection,Cmd,Opts). -- cgit v1.2.3