From 03d7a4ac57ac52358fbf5388f1462a5347882d50 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 18 Apr 2016 12:31:07 +0200 Subject: Skip pre/post test IO suite if cover or debug is running OTP-13535 The return value of ct:get_timetrap_info/0 has been modified. --- lib/common_test/doc/src/ct.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/common_test/doc') diff --git a/lib/common_test/doc/src/ct.xml b/lib/common_test/doc/src/ct.xml index a87be21d73..438099c074 100644 --- a/lib/common_test/doc/src/ct.xml +++ b/lib/common_test/doc/src/ct.xml @@ -601,18 +601,21 @@ - get_timetrap_info() -> {Time, Scale} + get_timetrap_info() -> {Time, {Scaling,ScaleVal}} Reads information about the timetrap set for the current test case. Time = integer() | infinity - Scale = true | false + Scaling = true | false + ScaleVal = integer()

Reads information about the timetrap set for the current test - case. Scale indicates if Common Test will attempt + case. Scaling indicates if Common Test will attempt to compensate timetraps automatically for runtime delays - introduced by, for example, tools like cover.

+ introduced by, for example, tools like cover. ScaleVal is + the value of the current scaling multipler (always 1 if scaling is + disabled). Note the Time is not the scaled result.

-- cgit v1.2.3 From bdbb8bfdfb653f4394c7440e0c7d081599c86ddc Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 2 May 2016 14:55:54 +0200 Subject: Update the reference manual OTP-13462 --- lib/common_test/doc/src/ct_telnet.xml | 5 ++++- lib/common_test/doc/src/unix_telnet.xml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/common_test/doc') diff --git a/lib/common_test/doc/src/ct_telnet.xml b/lib/common_test/doc/src/ct_telnet.xml index b7ba352104..1de278d30c 100644 --- a/lib/common_test/doc/src/ct_telnet.xml +++ b/lib/common_test/doc/src/ct_telnet.xml @@ -64,6 +64,8 @@ remaining string terminated) = 0

Polling interval (sleep time between polls) = 1 second

+

The TCP_NODELAY option for the telnet socket + is disabled (set to false) per default

These parameters can be modified by the user with the following @@ -76,7 +78,8 @@ {reconnection_interval,Millisec}, {keep_alive,Bool}, {poll_limit,N}, - {poll_interval,Millisec}]}. + {poll_interval,Millisec}, + {tcp_nodelay,Bool}]}.

Millisec = integer(), N = integer()

diff --git a/lib/common_test/doc/src/unix_telnet.xml b/lib/common_test/doc/src/unix_telnet.xml index 189379c39a..a064a222d6 100644 --- a/lib/common_test/doc/src/unix_telnet.xml +++ b/lib/common_test/doc/src/unix_telnet.xml @@ -80,7 +80,7 @@ - connect(ConnName, Ip, Port, Timeout, KeepAlive, Extra) -> {ok, Handle} | {error, Reason} + connect(ConnName, Ip, Port, Timeout, KeepAlive, TCPNoDelay, Extra) -> {ok, Handle} | {error, Reason} Callback for ct_telnet.erl. ConnName = target_name() @@ -88,6 +88,7 @@ Port = integer() Timeout = integer() KeepAlive = bool() + TCPNoDelay = bool() Extra = target_name() | {Username, Password} Username = string() Password = string() -- cgit v1.2.3 From b7ced331aa797567c4e180eec0b59e59f7227044 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Mon, 2 May 2016 01:14:10 +0200 Subject: Add flag/option for disabling the character escaping functionality OTP-13537 --- lib/common_test/doc/src/ct.xml | 2 +- lib/common_test/doc/src/ct_run.xml | 5 ++++- lib/common_test/doc/src/run_test_chapter.xml | 9 ++++++++- lib/common_test/doc/src/write_test_chapter.xml | 12 +++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'lib/common_test/doc') diff --git a/lib/common_test/doc/src/ct.xml b/lib/common_test/doc/src/ct.xml index 438099c074..b6c862c233 100644 --- a/lib/common_test/doc/src/ct.xml +++ b/lib/common_test/doc/src/ct.xml @@ -1139,7 +1139,7 @@ Opts. Opts = [OptTuples] - OptTuples = {dir, TestDirs} | {suite, Suites} | {group, Groups} | {testcase, Cases} | {spec, TestSpecs} | {join_specs, Bool} | {label, Label} | {config, CfgFiles} | {userconfig, UserConfig} | {allow_user_terms, Bool} | {logdir, LogDir} | {silent_connections, Conns} | {stylesheet, CSSFile} | {cover, CoverSpecFile} | {cover_stop, Bool} | {step, StepOpts} | {event_handler, EventHandlers} | {include, InclDirs} | {auto_compile, Bool} | {abort_if_missing_suites, Bool} | {create_priv_dir, CreatePrivDir} | {multiply_timetraps, M} | {scale_timetraps, Bool} | {repeat, N} | {duration, DurTime} | {until, StopTime} | {force_stop, ForceStop} | {decrypt, DecryptKeyOrFile} | {refresh_logs, LogDir} | {logopts, LogOpts} | {verbosity, VLevels} | {basic_html, Bool} | {ct_hooks, CTHs} | {enable_builtin_hooks, Bool} | {release_shell, Bool} + OptTuples = {dir, TestDirs} | {suite, Suites} | {group, Groups} | {testcase, Cases} | {spec, TestSpecs} | {join_specs, Bool} | {label, Label} | {config, CfgFiles} | {userconfig, UserConfig} | {allow_user_terms, Bool} | {logdir, LogDir} | {silent_connections, Conns} | {stylesheet, CSSFile} | {cover, CoverSpecFile} | {cover_stop, Bool} | {step, StepOpts} | {event_handler, EventHandlers} | {include, InclDirs} | {auto_compile, Bool} | {abort_if_missing_suites, Bool} | {create_priv_dir, CreatePrivDir} | {multiply_timetraps, M} | {scale_timetraps, Bool} | {repeat, N} | {duration, DurTime} | {until, StopTime} | {force_stop, ForceStop} | {decrypt, DecryptKeyOrFile} | {refresh_logs, LogDir} | {logopts, LogOpts} | {verbosity, VLevels} | {basic_html, Bool} | {esc_chars, Bool} | {ct_hooks, CTHs} | {enable_builtin_hooks, Bool} | {release_shell, Bool} TestDirs = [string()] | string() Suites = [string()] | [atom()] | string() | atom() Cases = [atom()] | atom() diff --git a/lib/common_test/doc/src/ct_run.xml b/lib/common_test/doc/src/ct_run.xml index d0ecc38564..2552938346 100644 --- a/lib/common_test/doc/src/ct_run.xml +++ b/lib/common_test/doc/src/ct_run.xml @@ -124,6 +124,7 @@ [-duration HHMMSS [-force_stop [skip_rest]]] | [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]] [-basic_html] + [-no_esc_chars] [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and .. CTHModuleN CTHOptsN] [-exit_status ignore_config] @@ -162,6 +163,7 @@ [-duration HHMMSS [-force_stop [skip_rest]]] | [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]] [-basic_html] + [-no_esc_chars] [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and .. CTHModuleN CTHOptsN] [-exit_status ignore_config] @@ -186,7 +188,8 @@ [-muliply_timetraps Multiplier] [-scale_timetraps] [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc] - [-basic_html] + [-basic_html] + [-no_esc_chars]
diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml index e04bb3e208..e5e217ca1d 100644 --- a/lib/common_test/doc/src/run_test_chapter.xml +++ b/lib/common_test/doc/src/run_test_chapter.xml @@ -266,6 +266,10 @@ ]]>

Sets verbosity levels for printouts.

+ + +

Disables automatic escaping of special HTML characters. + See the Logging chapter.

Directories passed to Common Test can have either relative or absolute paths.

@@ -802,7 +806,7 @@ program for an overview of available start flags (as most flags have a corresponding configuration term) Logging - (for terms verbosity, stylesheet and basic_html) + (for terms verbosity, stylesheet, basic_html and esc_chars) External Configuration Data (for terms config and userconfig) Event @@ -887,6 +891,9 @@ {basic_html, Bool}. {basic_html, NodeRefs, Bool}. + {esc_chars, Bool}. + {esc_chars, NodeRefs, Bool}. + {release_shell, Bool}.

Test terms:

diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml index e3811ec4cf..a7a652d506 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -1047,9 +1047,15 @@

Common Test will escape special HTML characters (<, > and &) in printouts to the log file made with ct:pal/4 and io:format/2. In order to print - strings with HTML tags to the log, use the ct:log/5 function. The character escaping - feature is per default disabled for ct:log/5, but can be enabled with the - esc_chars option.

+ strings with HTML tags to the log, use the ct:log/3,4,5 function. The character + escaping feature is per default disabled for ct:log/3,4,5 but can be enabled with + the esc_chars option in the Opts list, see + ct:log/3,4,5.

+ +

If the character escaping feature needs to be disabled (typically for backwards + compatibility reasons), use the ct_run start flag -no_esc_chars, or the + ct:run_test/1 start option {esc_chars,Bool} (this start option is also + supported in test specifications).

For more information about log files, see section Log Files -- cgit v1.2.3 From 42588839497b3944b63ce50947257698d857f4da Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 3 May 2016 10:11:11 +0200 Subject: Prepare release --- lib/common_test/doc/src/notes.xml | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'lib/common_test/doc') diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml index ff51b101cc..791be61066 100644 --- a/lib/common_test/doc/src/notes.xml +++ b/lib/common_test/doc/src/notes.xml @@ -33,6 +33,68 @@ notes.xml +

Common_Test 1.12.1 + +
Fixed Bugs and Malfunctions + + +

+ The nodelay option used to be enabled + (true) by default for sockets opened by the Common + Test telnet client. This appeared to cause communication + problems with telnet servers on some systems, and + therefore the option is no longer used. Its value may + instead be specified in the telnet connection settings. + See the man page for ct_telnet for details. Please + note that the interface function connect in + unix_telnet has been updated with an extra + argument and is now unix_telnet:connect/7.

+

+ Own Id: OTP-13462 Aux Id: seq13077

+
+ +

+ Fix bug in cth_surefire: When a pre_init_per_suite hook + fails before reaching the + cth_surefire:pre_init_per_suite, cth_surefire produced + incorrect XML.

+

+ Own Id: OTP-13513

+
+ +

+ The ct:get_timetrap_info/0 function has been + updated to return more information about timetrap + scaling.

+

+ Own Id: OTP-13535

+
+ +

+ A problem with stylesheet HTML tags getting incorrectly + escaped by Common Test has been corrected.

+

+ Own Id: OTP-13536

+
+ +

+ The ct_run start flag -no_esc_chars and + ct:run_test/1 start option {esc_chars,Bool} + have been introduced to make it possible to disable + automatic escaping of characters. Automatic escaping of + special HTML characters printed with io:format/1,2 + and ct:pal/1,2,3,4 was introduced in Common Test + 1.12. The new flag/option may be used to disable this + feature for backwards compatibility reasons. (The option + is also supported in test specifications).

+

+ Own Id: OTP-13537

+
+
+
+ +
+
Common_Test 1.12
Fixed Bugs and Malfunctions -- cgit v1.2.3