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