Skip to content

Commit 2b3f0ee

Browse files
committed
Testsuite: various changes to allow native light runtime runs
This commit brings various changes that allow the execution of the testsuite for a native target with a light runtime: - Fix light runtime detection pattern in RuntimeInfo; - Add missing RTS_ZFP filters for native only tests that use lagnuage features not available in the light runtime; - Remove exit code checking on native light runtime program execution, as the programs do not set the exit status code, often resulting in it being non-zero despite a normal termination of the program. This is in preparation of the introduction of CCG testing.
1 parent 9e2ef02 commit 2b3f0ee

File tree

15 files changed

+28
-5
lines changed

15 files changed

+28
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
native,RTS_ZFP DEAD Test assumes bin file available on native platform

testsuite/SUITE/control.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ def __init__(self, runtime_name=None):
252252
elif self.runtime_name.startswith('zfp'):
253253
self.has_light_runtime = True
254254
self.has_exception_propagation = False
255-
elif self.runtime_name.startswith('light-'):
255+
elif (
256+
self.runtime_name == "light"
257+
or self.runtime_name.startswith('light-')
258+
):
256259
self.has_light_runtime = True
257260
self.has_exception_propagation = False
258261
elif self.runtime_name == 'kernel':

testsuite/SUITE/tutils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,14 @@ def run_cov_program(executable, out=None, env=None, exec_args=None,
852852
# failing. Redirecting the standard input to /dev/null works around
853853
# this issue.
854854
inp = DEVNULL
855+
else:
856+
# Native programs using a light runtime can't set the exit code, and
857+
# will often terminate with a non-zero status code even though nothing
858+
# went wrong. There is thus no point in checking the exit code in this
859+
# configuration.
860+
register_failure = (
861+
register_failure and not RUNTIME_INFO.has_light_runtime
862+
)
855863

856864
args.append(executable)
857865
args.extend(exec_args)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
!x86-linux,!x86_64-linux DEAD test relies on passing command line arguments
1+
!x86-linux,!x86_64-linux DEAD test relies on passing command line arguments
2+
RTS_ZFP DEAD test relies on bin-file dump channel
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
ALL DEAD
2-
native
2+
native,!RTS_ZFP
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
!native DEAD Uses full runtime only constructs
2+
RTS_ZFP DEAD Uses full runtime only constructs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
src-traces,!native DEAD checking trace stamp, no way to get from BB programs
2+
native,RTS_ZFP DEAD checking trace stamp, no way to get it from light runtime
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
-- This test needs to check that --dump-channel is properly handled in a
22
-- typical gnatcov usage workflow. To do this, it needs multiple dump channels
3-
-- to be supported, i.e. a native platform (bin-file and base64-stdout).
3+
-- to be supported, i.e. a native platform (bin-file and base64-stdout), and
4+
-- a full runtime.
45
!native DEAD
6+
RTS_ZFP DEAD
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
!native DEAD Test specific to source trace binary files directly produced by automatic main instrumentation
2+
RTS_ZFP DEAD Test required bin-file dump channel to be available
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
!src-traces DEAD Checks a feature specific to the instrumenter
22
!native DEAD Checks the default dump channel (bin-file, native only)
3+
RTS_ZFP DEAD requires bin-file available

0 commit comments

Comments
 (0)