Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfaulting tests #429

Merged
merged 21 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Helpers_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ TEST(HelpersTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(renderEngine))
EXPECT_TRUE(renderEngineName().empty());

// Set the render engine GUI name
mainWindow->SetRenderEngine("ogre");
mainWindow->SetRenderEngine("ogre2");

// Has render engine
EXPECT_FALSE(renderEngineName().empty());
EXPECT_EQ("ogre", renderEngineName());
EXPECT_EQ("ogre2", renderEngineName());

// Set no render engine
mainWindow->SetRenderEngine({});
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/minimal_scene/MinimalScene.hh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace plugins
public: void TextureId(void* _texturePtr);

/// \brief Render engine to use
public: std::string engineName = "ogre";
public: std::string engineName = "ogre2";
mjcarroll marked this conversation as resolved.
Show resolved Hide resolved

/// \brief Unique scene name
public: std::string sceneName = "scene";
Expand Down
4 changes: 2 additions & 2 deletions test/integration/camera_tracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
// Load plugins
const char *pluginStr =
"<plugin filename=\"MinimalScene\">"
"<engine>ogre</engine>"
"<engine>ogre2</engine>"
"<scene>banana</scene>"
"<ambient_light>1.0 0 0</ambient_light>"
"<background_color>0 1 0</background_color>"
Expand Down Expand Up @@ -119,7 +119,7 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
EXPECT_TRUE(poseMsg.has_position());
EXPECT_TRUE(poseMsg.has_orientation());

auto engine = rendering::engine("ogre");
auto engine = rendering::engine("ogre2");
ASSERT_NE(nullptr, engine);

auto scene = engine->SceneByName("banana");
Expand Down
4 changes: 2 additions & 2 deletions test/integration/marker_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEST_F(MarkerManagerTestFixture,

const char *pluginMinimalSceneStr =
"<plugin filename=\"MinimalScene\">"
"<engine>ogre</engine>"
"<engine>ogre2</engine>"
"<scene>scene</scene>"
"</plugin>";

Expand Down Expand Up @@ -143,7 +143,7 @@ TEST_F(MarkerManagerTestFixture,
window->QuickWindow()->show();

// Check scene
auto engine = rendering::engine("ogre");
auto engine = rendering::engine("ogre2");
ASSERT_NE(nullptr, engine);

int sleep = 0;
Expand Down
5 changes: 2 additions & 3 deletions test/integration/minimal_scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
// Load plugin
const char *pluginStr =
"<plugin filename=\"MinimalScene\">"
"<engine>ogre</engine>"
"<engine>ogre2</engine>"
"<scene>banana</scene>"
"<ambient_light>1.0 0 0</ambient_light>"
"<background_color>0 1 0</background_color>"
Expand Down Expand Up @@ -123,7 +123,7 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
};

// Check scene
auto engine = rendering::engine("ogre");
auto engine = rendering::engine("ogre2");
ASSERT_NE(nullptr, engine);

int sleep = 0;
Expand Down Expand Up @@ -172,5 +172,4 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))

win->QuickWindow()->close();
engine->DestroyScene(scene);
EXPECT_TRUE(rendering::unloadEngine(engine->Name()));
}
5 changes: 2 additions & 3 deletions test/integration/transport_scene_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ TEST(TransportSceneManagerTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
// Load plugins
const char *pluginStr =
"<plugin filename=\"MinimalScene\">"
"<engine>ogre</engine>"
"<engine>ogre2</engine>"
"<scene>banana</scene>"
"<ambient_light>1.0 0 0</ambient_light>"
"<background_color>0 1 0</background_color>"
Expand Down Expand Up @@ -155,7 +155,7 @@ TEST(TransportSceneManagerTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
win->QuickWindow()->show();

// Get scene
auto engine = rendering::engine("ogre");
auto engine = rendering::engine("ogre2");
ASSERT_NE(nullptr, engine);

int sleep = 0;
Expand Down Expand Up @@ -261,6 +261,5 @@ TEST(TransportSceneManagerTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))

win->QuickWindow()->close();
engine->DestroyScene(scene);
EXPECT_TRUE(rendering::unloadEngine(engine->Name()));
mjcarroll marked this conversation as resolved.
Show resolved Hide resolved
}