Skip to content

Commit a8b85b4

Browse files
committed
Add a 'check_semantic' configuration attribute to the GNATcheck testing driver
1 parent fb63d5e commit a8b85b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

testsuite/drivers/gnatcheck_driver.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class GnatcheckDriver(BaseDriver):
8888
chain in diagnostics concerning generic constructs.
8989
- ``extra_args`` (list[str]): Extra arguments to pass to GNATcheck.
9090
91+
- ``check_semantic`` (bool): Whether to add the ``--check-semantic``
92+
flag when running GNATcheck.
9193
- ``rules`` (list[str]): A list of rules with their arguments, in the
9294
gnatcheck format. Note that the list can be empty, and people can
9395
instead decide to pass rules via the project file.
@@ -506,6 +508,10 @@ def run_one_test(test_data: dict[str, any]) -> None:
506508
for k, v in test_data.get("scenario_variables", {}).items():
507509
args.append(f"-X{k}={v}")
508510

511+
# If required, add the "--check-semantic" flag
512+
if test_data.get("check_semantic"):
513+
args.append("--check-semantic")
514+
509515
# Add the rule directories
510516
for rule_dir in test_data.get("rules_dirs", []):
511517
args.append(f"--rules-dir={rule_dir}")

0 commit comments

Comments
 (0)