From 801d6f7e0b1dc690def5a28b8095f74a271d0d38 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 4 Dec 2019 17:22:27 +0100 Subject: common_test: Document cover incl_app directive --- lib/common_test/doc/src/cover_chapter.xml | 50 ++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 14 deletions(-) (limited to 'lib/common_test') diff --git a/lib/common_test/doc/src/cover_chapter.xml b/lib/common_test/doc/src/cover_chapter.xml index 6c180c276c..e05943bb3b 100644 --- a/lib/common_test/doc/src/cover_chapter.xml +++ b/lib/common_test/doc/src/cover_chapter.xml @@ -125,8 +125,12 @@
The Cover Specification File -

The following terms are allowed in a cover specification file:

+
+ General Config + +

Here follows the general configuration terms that are allowed in a cover specification file:

+
  %% List of Nodes on which cover will be active during test.
  %% Nodes = [atom()]
@@ -143,7 +147,7 @@
  %% Cover analysis level.
  %% Level = details | overview
  {level, Level}.       
-
+ 
  %% Directories to include in cover.
  %% Dirs = [string()]
  {incl_dirs, Dirs}.
@@ -169,19 +173,37 @@
  %% Mod = [atom()], modules to compile for accumulated analysis
  {cross,[{Tag,Mods}]}.
-

The terms incl_dirs_r and excl_dirs_r tell Common - Test to search the specified directories recursively and include - or exclude any module found during the search. The terms - incl_dirs and excl_dirs result in a - non-recursive search for modules (that is, only modules found in - the specified directories are included or excluded).

-

Directories containing Erlang modules to be included in a code - coverage test must exist in the code server path. Otherwise, - the Cover tool fails to recompile the modules. It is not sufficient to - specify these directories in the cover specification file for - Common Test.

+

The terms incl_dirs_r and excl_dirs_r tell Common + Test to search the specified directories recursively and include + or exclude any module found during the search. The terms + incl_dirs and excl_dirs result in a + non-recursive search for modules (that is, only modules found in + the specified directories are included or excluded).

+

Directories containing Erlang modules to be included in a code + coverage test must exist in the code server path. Otherwise, + the Cover tool fails to recompile the modules. It is not sufficient to + specify these directories in the cover specification file for + Common Test.

+
+ +
+ OTP application Config + +

When using a cover specification in the testing of an OTP + application itself, there is a special incl_app directive that + includes the applications modules for the cover compilation.

+ +
+{incl_app, AppName, Cover:: overview | details}.
+
+ +

If you desire to also use some other general cover configuration + together with this option you should insert the AppName in between + the option and its value creating a three tuple. +

+
- +
Cross Cover Analysis -- cgit v1.2.1