Skip to content

Commit 6a32baf

Browse files
committed
Add a 'process_closure' configuration attribute to the GNATcheck testing driver
1 parent a8b85b4 commit 6a32baf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

testsuite/drivers/gnatcheck_driver.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ class GnatcheckDriver(BaseDriver):
7070
resolution.
7171
- ``subdirs`` (str): The directory to forward to GNATcheck `--subdirs`
7272
option.
73+
- ``process_closure`` (bool): Whether to provide the ``-U`` flag when
74+
spawning GNATcheck in order to only process the project closure.
75+
If ``input_sources`` are provided, those are considered as roots
76+
for closure resolution.
7377
- ``input_sources`` (list[str]): Ada files to analyze (if explicit,
7478
optional if `project` is passed).
7579
- ``include_file`` (str): If passed, include all sources listed in the
@@ -492,6 +496,10 @@ def run_one_test(test_data: dict[str, any]) -> None:
492496
)
493497
args += [f"--ignore={ignore_file}"]
494498

499+
# Add the "-U" flag if required
500+
if test_data.get("process_closure"):
501+
args.append("-U")
502+
495503
# Add the specified sources to GNATcheck arguments
496504
if test_data.get("input_sources", None):
497505
args += test_data["input_sources"]

0 commit comments

Comments
 (0)