From 98c5eef3ca09d559560957e91618156b236bd5e1 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 19 Dec 2022 12:50:56 -0600 Subject: [PATCH] Disable ogre tests on windows (#303) Ogre tests are not working on windows as discussed in #284. Signed-off-by: Addisu Z. Taddese --- test/integration/camera.cc | 9 +++++++++ test/integration/depth_camera.cc | 13 +++++++++++++ test/integration/distortion_camera.cc | 9 +++++++++ test/integration/gpu_lidar_sensor.cc | 14 ++++++++++++++ test/integration/rgbd_camera.cc | 14 ++++++++++++++ test/integration/thermal_camera.cc | 14 ++++++++++++++ test/integration/triggered_camera.cc | 9 +++++++++ test/integration/wide_angle_camera.cc | 9 +++++++++ 8 files changed, 91 insertions(+) diff --git a/test/integration/camera.cc b/test/integration/camera.cc index 61441b03..316010e5 100644 --- a/test/integration/camera.cc +++ b/test/integration/camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -68,6 +69,14 @@ class CameraSensorTest: public testing::Test, // Documentation inherited protected: void SetUp() override { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif gz::common::Console::SetVerbosity(4); } diff --git a/test/integration/depth_camera.cc b/test/integration/depth_camera.cc index 4e9eb002..43b726aa 100644 --- a/test/integration/depth_camera.cc +++ b/test/integration/depth_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -139,6 +140,18 @@ void OnPointCloud(const gz::msgs::PointCloudPacked &_msg) class DepthCameraSensorTest: public testing::Test, public testing::WithParamInterface { + // Documentation inherited + protected: void SetUp() override + { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif + } // Create a Camera sensor from a SDF and gets a image message public: void ImagesWithBuiltinSDF(const std::string &_renderEngine); }; diff --git a/test/integration/distortion_camera.cc b/test/integration/distortion_camera.cc index a4ba56a9..7a65899f 100644 --- a/test/integration/distortion_camera.cc +++ b/test/integration/distortion_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -46,6 +47,14 @@ class DistortionCameraSensorTest: public testing::Test, // Documentation inherited protected: void SetUp() override { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif gz::common::Console::SetVerbosity(4); } diff --git a/test/integration/gpu_lidar_sensor.cc b/test/integration/gpu_lidar_sensor.cc index 798f6514..c713f2fb 100644 --- a/test/integration/gpu_lidar_sensor.cc +++ b/test/integration/gpu_lidar_sensor.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -139,6 +140,19 @@ void pointCb(const gz::msgs::PointCloudPacked &_msg) class GpuLidarSensorTest: public testing::Test, public testing::WithParamInterface { + // Documentation inherited + protected: void SetUp() override + { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif + } + // Test and verify gpu rays properties setters and getters public: void CreateGpuLidar(const std::string &_renderEngine); diff --git a/test/integration/rgbd_camera.cc b/test/integration/rgbd_camera.cc index 0b6f5c70..fc778eb5 100644 --- a/test/integration/rgbd_camera.cc +++ b/test/integration/rgbd_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -158,6 +159,19 @@ void OnPointCloud(const msgs::PointCloudPacked &_msg) class RgbdCameraSensorTest: public testing::Test, public testing::WithParamInterface { + // Documentation inherited + protected: void SetUp() override + { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif + } + // Create a Camera sensor from a SDF and gets a image message public: void ImagesWithBuiltinSDF(const std::string &_renderEngine); }; diff --git a/test/integration/thermal_camera.cc b/test/integration/thermal_camera.cc index 3c6dbb2e..94db0b14 100644 --- a/test/integration/thermal_camera.cc +++ b/test/integration/thermal_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -89,6 +90,19 @@ void OnImage8Bit(const gz::msgs::Image &_msg) class ThermalCameraSensorTest: public testing::Test, public testing::WithParamInterface { + // Documentation inherited + protected: void SetUp() override + { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif + } + // Create a Camera sensor from a SDF and gets a image message public: void ImagesWithBuiltinSDF(const std::string &_renderEngine); diff --git a/test/integration/triggered_camera.cc b/test/integration/triggered_camera.cc index 995471a3..31d86be6 100644 --- a/test/integration/triggered_camera.cc +++ b/test/integration/triggered_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -49,6 +50,14 @@ class TriggeredCameraTest: public testing::Test, // Documentation inherited protected: void SetUp() override { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif gz::common::Console::SetVerbosity(4); } diff --git a/test/integration/wide_angle_camera.cc b/test/integration/wide_angle_camera.cc index cb8c87e8..c1eb63b3 100644 --- a/test/integration/wide_angle_camera.cc +++ b/test/integration/wide_angle_camera.cc @@ -15,6 +15,7 @@ * */ +#include #include #include @@ -75,6 +76,14 @@ class WideAngleCameraSensorTest: public testing::Test, // Documentation inherited protected: void SetUp() override { + // Disable Ogre tests on windows. See + // https://github.com/gazebosim/gz-sensors/issues/284 +#ifdef _WIN32 + if (strcmp(GetParam(), "ogre") == 0) + { + GTEST_SKIP() << "Ogre tests disabled on windows. See #284."; + } +#endif gz::common::Console::SetVerbosity(4); }