Skip to content

Commit

Permalink
Move Scene3d_TEST.cc to test/integration
Browse files Browse the repository at this point in the history
There seems to be a problem with loading the ignition-rendering-ogre
plugin from the Scene3D test if it links to that plugin. Making
Scene3D_TEST.cc into an integration test works because it doesn't
directly call any plugin methods.

This also changes the linking for the Grid3D plugin to only link
to the ignition-rendering core library target instead of the
IGNITION-RENDERING_LIBRARIES variable which includes the ogre
component library plugins.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed May 6, 2021
1 parent 2eb2ee0 commit 899b97a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/plugins/grid_3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ ign_gui_add_plugin(Grid3D
TEST_SOURCES
# Grid3D_TEST.cc
PUBLIC_LINK_LIBS
${IGNITION-RENDERING_LIBRARIES}
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER}
)

4 changes: 1 addition & 3 deletions src/plugins/scene3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ ign_gui_add_plugin(Scene3D
Scene3D.cc
QT_HEADERS
Scene3D.hh
TEST_SOURCES
Scene3D_TEST.cc
PUBLIC_LINK_LIBS
${IGNITION-RENDERING_LIBRARIES}
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER}
)

7 changes: 6 additions & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ign_get_sources(tests)

ign_build_tests(TYPE INTEGRATION SOURCES ${tests})
ign_build_tests(
TYPE INTEGRATION
SOURCES ${tests}
LIB_DEPS
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER})
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "ignition/gui/Plugin.hh"
#include "ignition/gui/MainWindow.hh"

#include "Scene3D.hh"

int g_argc = 1;
char **g_argv = new char *[g_argc];

Expand Down Expand Up @@ -97,6 +95,7 @@ TEST(Scene3DTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
auto engine = rendering::engine("ogre");
ASSERT_NE(nullptr, engine);

EXPECT_EQ(1u, engine->SceneCount());
auto scene = engine->SceneByName("banana");
ASSERT_NE(nullptr, scene);

Expand Down

0 comments on commit 899b97a

Please sign in to comment.