2847 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
2286b389c7 instrument-projects.adb: fix handling of No_Body units as closure roots
Units that contain only `pragma No_Body;` should be ignored when
computing an Ada source closure: LibGPR2 assigns them no name (so
gnatcov could crash with an assertion failure), and they cannot have
dependencies anyway.
2026-02-12 09:07:26 +00:00
Pierre-Marie de Rodat
12542a4ca4 Qualif/C/stmt/Core/08_Statements/05_Iteration/03_For: fix undef behavior 2026-02-11 16:27:19 +00:00
Pierre-Marie de Rodat
b37901aedd sc_obligations.adb: make fingerprints insensitive to line number changes
This allows passing to `gnatcov coverage` traces produced before the
addition of exemption annotations (or gnatcov-unrelated annotation) to
source code.

This commit also adapts `320-varying-scos` tests so that SCOS that are
supposed to be distinct get different column numbers, in order to
correctly exercise the "SCO fingerprint mismatch" behavior.
2026-02-11 12:57:43 +00:00
Pierre-Marie de Rodat
7804f3fad4 Make it possible to pass --relocate-build-tree without an explicit dir 2026-02-06 13:33:55 +00:00
Dorian Peron
52f85570ad test(cpp-funcall): Add tests for ctors call instrumentation 2026-02-06 12:47:56 +01:00
Pierre-Marie de Rodat
1ef4cc57e5 Ada 2022: add support for contracts in access-to-subp types
(cherry picked from commit 05fd8b3b1e)
2026-02-02 21:20:17 +00:00
Pierre-Marie de Rodat
397e01fad5 Check support for expression defaults for generic formal functions
(cherry picked from commit 080266a0ae)
2026-02-02 21:07:16 +00:00
Pierre-Marie de Rodat
b02afa6c0f Check support for deep delta aggregates
(cherry picked from commit 652de8613c)
2026-02-02 21:07:16 +00:00
Léo Creuse
34e630e4ca XFAIL misbehaving tests pending GCC adaptations
Following the update to GCC 15 on aarch64-elf, some tests started
misbehaving with -O1. XFAIL the tests while investigations and fixes
are made on the GCC side.

(cherry picked from commit 746e5d02b4)
2026-02-02 21:07:16 +00:00
Pierre-Marie de Rodat
fd733c0d06 Ada 2022: add support for contracts in generic formal subprograms
(cherry picked from commit e70d901e62)
2026-02-02 21:07:16 +00:00
Pierre-Marie de Rodat
ad81422640 Update test baselines after recent GPR2 error messages improvements
(cherry picked from commit 50558f71a3)
2026-02-02 21:07:16 +00:00
Pierre-Marie de Rodat
51a9459d75 716-static-decision-merging-in-ckpt: shorten name for Windows
Some testsuite runs on Windows are done in a directory whose name is
long enough for this group of tests to hit the 256 bytes limit for
filenames on Windows. Shorten this directory name to avoid this problem
in practice.
2026-02-02 08:13:44 +00:00
Dorian Peron
05de8234d6 test(cpp-funcall): Use __SIZE_TYPE__ compiler macro 2026-01-30 09:32:44 +00:00
Pierre-Marie de Rodat
2134b3e2de integrated_instrumentation: correct to kill test on non-Linux hosts
It seems that the `windows` discriminant is not always set on Windows
hosts (for instance: it is not set on `arm-elf-windows64` testsuite
runs), so use instead `linux-host`, which seems to be always set on all
Linux host, so that the `extra.opt` command is more in line with the
associated comment.
2026-01-29 13:37:22 +01:00
Pierre-Marie de Rodat
b21b6565f5 Instrument: fix output dir. for instr sources of multi-project units 2026-01-28 09:25:08 +00:00
Dorian Peron
ab01038c26 test(cpp-funcall): test user defined literals 2026-01-27 17:54:56 +01:00
Dorian Peron
07445c13b5 pre-commit: move clang config to .clang-format file 2026-01-27 17:54:56 +01:00
Dorian Peron
0a78e6e24c shorten test dir "c_cpp_function_call_cov" to "c_cpp_funcall" 2026-01-27 17:51:36 +01:00
Pierre-Marie de Rodat
42672aa0ee Testsuite: do not enable GPR mode automatically with source traces 2026-01-26 10:26:01 +00:00
Léo Creuse
58825a6eb8 Merge branch 'topic/9-qualified-interface' into 'qualkit-4502'
Various PLANS & TORVVCP updates

See merge request eng/das/cov/gnatcoverage-qualification!45

This MR updates the PLANS and TORVVCP documents in various ways:

* Relax restrictions on the allowed values for `--dump-trigger` and `--dump-channel` ;
* Allow use of `--insturment-block` in the `instrument` command, provided that no exceptions are handled and no exceptions occur at runtime;
* Remove erroneous description of the tool operating principle, and corresponding reference documents. These were leftovers from the binary traces qualification kit;

(cherry picked from commit 9a1878fdd2d5af73ee3c6691f7e86e36286c7ed0)
2026-01-23 08:24:12 +00:00
Vasiliy Fofanov
da9f805732 Merge branch 'topic/4502-qa-edits-1' into 'qualkit-4502'
Address QA comments

See merge request eng/das/cov/gnatcoverage-qualification!40

This MR contains multiple commits addressing various comments raised during the first round of QA on the generated kit.

(cherry picked from commit 93fff75cecddb504ec2a1ce1dab3848e50ea7c4c)
2026-01-23 08:24:12 +00:00
Léo Creuse
435d0d95fa Merge branch 'topic/4205-various-fixes' into 'qualkit-4502'
Various qualkit updates

See merge request eng/das/cov/gnatcoverage-qualification!36

The modifications include:

* TOR: Refinements over the expected execution environment
* TOR: remove index entry definitions
* PLANS: Remove duplicate revision history section

(cherry picked from commit 772afba72ae4014b866562d04b6f3fd8c5f8d5dd)
2026-01-23 08:24:12 +00:00
Pierre-Marie de Rodat
970d966752 instr-cov/514-funcall-pre2012: kill with old toolchains 2026-01-22 14:28:39 +00:00
Pierre-Marie de Rodat
5e65869bfd Instrument the same set of Ada sources that GPRbuild will compile
Make `gnatcov instrument` refrain from instrumenting Ada source files
that GPRbuild would not compile when given the same project options. For
instance, do not instrument source files that belong to the root project
but which are not in the closure of GPR mains.

Adapt relevant existing testcases to accomodate this new behavior: this
makes source instrumentation behave mor like coverage with binary
traces.
2026-01-21 20:43:35 +00:00
Pierre-Marie de Rodat
c36f80c86f SUITE.tutils: fix gprfor for projects with Ada+C mains 2026-01-21 20:43:35 +00:00