Skip to content

Commit 8c8bb4e

Browse files
committed
base_driver.py: add output refiners to canonicalize target names
1 parent 2f25d4f commit 8c8bb4e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

testsuite/drivers/base_driver.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ def output_refiners(self) -> list[OutputRefiner]:
417417
result.append(Substitute(self.working_dir(), "<working-dir>"))
418418
if self.test_env.get("canonicalize_backslashes", True):
419419
result.append(Substitute("\\", "/"))
420+
if self.test_env.get("canonicalize_target", False):
421+
result.append(Substitute("x86_64-linux", "<target>"))
422+
result.append(Substitute("x86_64-windows", "<target>"))
420423
return result
421424

422425
def parse_flagged_lines(self, output: str) -> dict[str, TaggedLines]:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<gnatcheck_worker_exe> -P<working-dir>/p.gpr --target=x86_64-linux -d --log-file=<working-dir>/gnatcheck-log1.TMP --files-from=<working-dir>/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck-rules0.TMP
1+
<gnatcheck_worker_exe> -P<working-dir>/p.gpr --target=<target> -d --log-file=<working-dir>/gnatcheck-log1.TMP --files-from=<working-dir>/gnatcheck-files1.TMP --rules-from=<working-dir>/gnatcheck-rules0.TMP

testsuite/tests/gnatcheck/implicit_project_spawn/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ rules:
55
- +Rsame_instantiations
66
extra_args:
77
- -d
8+
canonicalize_target: true

0 commit comments

Comments
 (0)