Skip to content

Commit 4aca587

Browse files
committed
Merge branch 'eyraud/158' into 'master'
Improve gnatcov documentation wrt. --subprograms Closes #158 See merge request eng/das/cov/gnatcoverage!324 Fixes eng/das/cov/gnatcoverage#158
2 parents f6b3f52 + e50613f commit 4aca587

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

doc/gnatcov/units_of_interest.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,23 +203,29 @@ and then executing::
203203

204204
gnatcov <command> --units=@units.list
205205

206-
Conveying *subprograms* of interest
207-
***********************************
206+
Conveying *subprograms* of interest (experimental)
207+
**************************************************
208208

209209
|gcv| enables even finer grain control through the use of ``--subprograms``
210210
switch, which restricts coverage analysis to the specified list of subprograms
211211
of interest.
212212

213-
The ``--subprograms`` switch expects a ``<full_filename>:<line>`` argument,
214-
where ``<full_filename>`` is the full path to the subprogram source, and
215-
``line`` is the specification line for Ada subprograms, and the body line for
216-
C/C++ functions.
213+
The ``--subprograms`` switch expects a ``<filename>:<line>`` argument, where
214+
``<filename>`` is a source file name path, absolute or relative to the current
215+
directory, pointing to the subprogram source and ``line`` is the first line of
216+
the subprogram specification in Ada, and the first line of the function
217+
definition in C/C++.
217218

218219
Every coverage obligation from non subprograms of interest is discarded and
219220
reported as *no code* in the various output formats, and the associated coverage
220221
data is ignored. This means that checkpoints will hold coverage data for
221222
subprograms of interest only.
222223

224+
The ``--subprograms`` switch acts only on subprograms within units of interest.
225+
If a unit was ignored for coverage analysis through a project attribute (e.g.
226+
``Excluded_Units``) or through a command line switch (e.g. ``--units``), the
227+
designated subprogram will be ignored for coverage analysis as well.
228+
223229
.. _gpr_context:
224230

225231
Other switches or attributes of importance

0 commit comments

Comments
 (0)