Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 committed Aug 17, 2023
1 parent e655d40 commit f80b853
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/integration/minimal_scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,19 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
pluginDoc.FirstChildElement("plugin")));
EXPECT_TRUE(app.LoadPlugin("InteractiveViewControl"));

std::cerr << " =================== create main window " << std::endl;

// Get main window
auto win = app.findChild<MainWindow *>();
ASSERT_NE(nullptr, win);

// Show, but don't exec, so we don't block
win->QuickWindow()->show();

std::cerr << " =================== before get render engine " << std::endl;
// get render engine after window is shown
auto engine = gz::gui::testing::getRenderEngine("ogre2");
std::cerr << " =================== after get render engine " << std::endl;
ASSERT_NE(nullptr, engine);

EXPECT_EQ(1u, engine->SceneCount());
Expand Down Expand Up @@ -145,6 +149,12 @@ TEST(MinimalSceneTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
plugins.clear();

win->QuickWindow()->close();

std::cerr << " =================== before destroying scene" << std::endl;
engine->DestroyScene(scene);

std::cerr << " =================== before unloading engine " << std::endl;
EXPECT_TRUE(rendering::unloadEngine(engine->Name()));

std::cerr << " =================== exiting " << std::endl;
}

0 comments on commit f80b853

Please sign in to comment.