Skip to content

Commit bb115bd

Browse files
committed
added gmsl and usb to context
1 parent feb8fa3 commit bb115bd

6 files changed

Lines changed: 36 additions & 6 deletions

File tree

unit-tests/live/d400/test-emitter-frequency.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# License: Apache 2.0. See LICENSE file in root directory.
22
# Copyright(c) 2022 RealSense, Inc. All Rights Reserved.
33

4-
#test:device:jetson D457
5-
#test:device:!jetson D455
4+
# test:device D457
5+
# test:donotrun:!gmsl
66

77
import pyrealsense2 as rs
88
import pyrsutils as rsutils

unit-tests/live/d400/test-mipi-motion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# License: Apache 2.0. See LICENSE file in root directory.
22
# Copyright(c) 2024 RealSense, Inc. All Rights Reserved.
33

4-
# test:device:jetson D457
5-
# test:donotrun:!jetson
4+
# test:device D457
5+
# test:donotrun:!gmsl
66
# test:retries 3
77

88
import pyrealsense2 as rs

unit-tests/live/frames/test-backend-vs-frame-timestamp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# License: Apache 2.0. See LICENSE file in root directory.
22
# Copyright(c) 2025 RealSense, Inc. All Rights Reserved.
33

4-
# test:device D400* !D457
4+
# test:device D400*
5+
# test:donotrun:gmsl
56

67
import pyrealsense2 as rs
78
from rspy import test, log

unit-tests/live/options/test-drops-on-set.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# License: Apache 2.0. See LICENSE file in root directory.
22
# Copyright(c) 2020 RealSense, Inc. All Rights Reserved.
33

4-
# test:device D400* !D457
4+
# test:device D400*
55
# test:device D555
6+
# test:donotrun:gmsl
67

78
import platform
89
import pyrealsense2 as rs

unit-tests/py/rspy/devices.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__( self, sn, dev ):
6363
self._sn = sn
6464
self._dev = dev
6565
self._name = None
66+
self._connection_type = None
6667
if dev.supports( rs.camera_info.name ):
6768
self._name = dev.get_info( rs.camera_info.name )
6869
if self._name.startswith( 'Intel RealSense ' ):
@@ -140,6 +141,17 @@ def enabled( self ):
140141
def is_dds(self):
141142
return self._is_dds
142143

144+
@property
145+
def is_gmsl(self):
146+
return self._connection_type == "GMSL"
147+
148+
@property
149+
def is_usb(self):
150+
return self._connection_type == "USB"
151+
152+
@property
153+
def connection_type(self):
154+
return self._connection_type
143155

144156
def wait_until_all_ports_disabled( timeout = 5 ):
145157
"""

unit-tests/run-unit-tests.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,22 @@ def close_hubs():
529529
disable_dds = "dds" not in context
530530
devices.query( hub_reset = hub_reset, disable_dds=disable_dds ) #resets the device
531531
devices.map_unknown_ports()
532+
# adjust context with connectivity types present (usb/gmsl/dds)
533+
present = set()
534+
for sn in devices.all():
535+
d = devices.get(sn)
536+
if not d:
537+
continue
538+
if d.is_usb:
539+
present.add('usb')
540+
if d.is_gmsl:
541+
present.add('gmsl')
542+
if d.is_dds:
543+
present.add('dds')
544+
545+
for c in sorted(present):
546+
if c not in context:
547+
context.append(c)
532548
#
533549
# Under a development environment (i.e., without a hub), we may only have one device connected
534550
# or even none and want to only show a warning for live tests:

0 commit comments

Comments
 (0)