Skip to content

Commit c86f33d

Browse files
committed
Add explicit warning tolerance to tests
Now that the testsuite check for warnings in all of gnatcov commands, rather than only instrumentation.
1 parent a7475e8 commit c86f33d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

testsuite/tests/IA22-004-same-basename/test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ def hostify(path):
6363
"main.elf.trace",
6464
"--output-dir=tmp",
6565
]
66-
+ rebase_args
66+
+ rebase_args,
67+
# The files generated by the binder are not available at coverage time
68+
tolerate_messages="warning: can't open",
6769
)
6870

6971
for slug in ("d1-func.c", "d2-func.c"):

testsuite/tests/L929-006/test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ def to_object(sfile):
2525
out_actual = target + "-actual.out"
2626
out_expected = "../" + target + "-expected.out"
2727

28-
xcov(["scan-objects"] + ofiles, out=out_actual)
28+
xcov(["scan-objects"] + ofiles, out=out_actual, tolerate_messages=".")
2929

3030
thistest.fail_if(
3131
diff(out_actual, out_expected),
3232
"%s != %s, using explicit list" % (out_actual, out_expected),
3333
)
3434

35-
xcov(["scan-objects", "@" + list_to_file(ofiles)], out=out_actual)
35+
xcov(
36+
["scan-objects", "@" + list_to_file(ofiles)],
37+
out=out_actual,
38+
tolerate_messages=".",
39+
)
3640

3741
thistest.fail_if(
3842
diff(out_actual, out_expected),

testsuite/tests/U211-014-setup/ext_rt/gnatcov_rts-base_io.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ package body GNATcov_RTS.Base_Io is
3737
---------
3838

3939
procedure Put (S : GNATcov_RTS_String) is
40+
pragma Warnings (Off);
4041
Str : String (1 .. Integer (S.Length));
4142
for Str'Address use S.Str;
43+
pragma Warning (On);
4244
begin
4345
Print_Tag;
4446
GNAT.IO.Put_Line (Str);

0 commit comments

Comments
 (0)