Skip to content

Commit 1249119

Browse files
committed
Add a 'check_redefinition' configuration attribute to the GNATcheck testing driver
1 parent 8817303 commit 1249119

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
@@ -101,6 +101,8 @@ class GnatcheckDriver(BaseDriver):
101101
102102
- ``check_semantic`` (bool): Whether to add the ``--check-semantic``
103103
flag when running GNATcheck.
104+
- ``check_redefinition`` (bool): Whether to add the
105+
``--check-redefinition`` flag when running GNATcheck.
104106
- ``rules`` (list[str]): A list of rules with their arguments, in the
105107
gnatcheck format. Note that the list can be empty, and people can
106108
instead decide to pass rules via the project file.
@@ -531,6 +533,10 @@ def run_one_test(test_data: dict[str, any]) -> None:
531533
if test_data.get("check_semantic"):
532534
args.append("--check-semantic")
533535

536+
# If required, add the "--check-redefinition" flag
537+
if test_data.get("check_redefinition"):
538+
args.append("--check-redefinition")
539+
534540
# Add the rule directories
535541
for rule_dir in test_data.get("rules_dirs", []):
536542
args.append(f"--rules-dir={rule_dir}")

0 commit comments

Comments
 (0)