diff --git a/realsense2_camera/test/live_camera/test_camera_fps_tests.py b/realsense2_camera/test/live_camera/test_camera_fps_tests.py index 31b2d31187..c4b91354d4 100644 --- a/realsense2_camera/test/live_camera/test_camera_fps_tests.py +++ b/realsense2_camera/test/live_camera/test_camera_fps_tests.py @@ -29,6 +29,7 @@ sys.path.append(os.path.abspath(os.path.dirname(__file__)+"/../utils")) import pytest_rs_utils +import pytest_live_camera_utils from pytest_rs_utils import launch_descr_with_parameters from pytest_rs_utils import get_rosbag_file_path @@ -71,6 +72,9 @@ class TestCamera_TestFPS(pytest_rs_utils.RsTestBaseClass): def test_camera_test_fps(self,launch_descr_with_parameters): params = launch_descr_with_parameters[1] + if pytest_live_camera_utils.check_if_camera_connected(params['device_type']) == False: + print("Device not found? : " + params['device_type']) + return try: ''' initialize, run and check the data diff --git a/realsense2_camera/test/live_camera/test_camera_imu_tests.py b/realsense2_camera/test/live_camera/test_camera_imu_tests.py index 317833e331..384d249f47 100644 --- a/realsense2_camera/test/live_camera/test_camera_imu_tests.py +++ b/realsense2_camera/test/live_camera/test_camera_imu_tests.py @@ -55,6 +55,9 @@ class TestLiveCamera_TestMotionSensor(pytest_rs_utils.RsTestBaseClass): def test_LiveCamera_check_motion_sensor(self,launch_descr_with_parameters): params = launch_descr_with_parameters[1] + if pytest_live_camera_utils.check_if_camera_connected(params['device_type']) == False: + print("Device not found? : " + params['device_type']) + return themes = [{'topic':get_node_heirarchy(params)+'/imu', 'msg_type':msg_Imu,'expected_data_chunks':1}, {'topic':get_node_heirarchy(params)+'/gyro/sample', 'msg_type':msg_Imu,'expected_data_chunks':1}, {'topic':get_node_heirarchy(params)+'/accel/sample', 'msg_type':msg_Imu,'expected_data_chunks':1}] diff --git a/realsense2_camera/test/live_camera/test_d415_basic_tests.py b/realsense2_camera/test/live_camera/test_d415_basic_tests.py index d93bbe5b57..649f84e7bd 100644 --- a/realsense2_camera/test/live_camera/test_d415_basic_tests.py +++ b/realsense2_camera/test/live_camera/test_d415_basic_tests.py @@ -55,8 +55,12 @@ class TestD415_Change_Resolution(pytest_rs_utils.RsTestBaseClass): def test_D415_Change_Resolution(self,launch_descr_with_parameters): params = launch_descr_with_parameters[1] + if pytest_live_camera_utils.check_if_camera_connected(params['device_type']) == False: + print("Device not found? : " + params['device_type']) + return failed_tests = [] num_passed = 0 + num_failed = 0 themes = [{'topic':get_node_heirarchy(params)+'/color/image_raw', 'msg_type':msg_Image,'expected_data_chunks':1}] config = pytest_live_camera_utils.get_profile_config(get_node_heirarchy(params)) diff --git a/realsense2_camera/test/live_camera/test_d455_basic_tests.py b/realsense2_camera/test/live_camera/test_d455_basic_tests.py index 0d2163a3e3..7848ff4986 100644 --- a/realsense2_camera/test/live_camera/test_d455_basic_tests.py +++ b/realsense2_camera/test/live_camera/test_d455_basic_tests.py @@ -29,6 +29,7 @@ sys.path.append(os.path.abspath(os.path.dirname(__file__)+"/../utils")) import pytest_rs_utils +import pytest_live_camera_utils from pytest_rs_utils import launch_descr_with_parameters from pytest_rs_utils import get_rosbag_file_path @@ -55,6 +56,10 @@ class TestD455_Change_Resolution(pytest_rs_utils.RsTestBaseClass): def test_D455_Change_Resolution(self,launch_descr_with_parameters): params = launch_descr_with_parameters[1] + if pytest_live_camera_utils.check_if_camera_connected(params['device_type']) == False: + print("Device not found? : " + params['device_type']) + return + themes = [ {'topic':get_node_heirarchy(params)+'/color/image_raw', 'msg_type':msg_Image,