Skip to content

Commit 1e73305

Browse files
committed
[unittests][dataflowrendering] fix segfault on Linux
1 parent 6a78680 commit 1e73305

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

tests/unittest/Dataflow/renderinggraph.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ using namespace Ra::Dataflow::Core;
88
using namespace Ra::Dataflow::Rendering;
99

1010
TEST_CASE( "Dataflow/Rendering/RenderingGraph", "[Dataflow][Rendering][RenderingGraph]" ) {
11-
11+
#if defined( OS_LINUX )
12+
{
13+
// This is required on Linux to force loading the libDataflowRendering.so so that the
14+
// node factory for Rendering is initialized.
15+
// If not present, as no symbols are explicitly used from this lib, the linker
16+
// optimize out the lib.
17+
// All the test below use only the general interface of a DataflowGraph, the dependency to
18+
// symbols exported by the rendering lib is only managed by the node factory.
19+
RenderingGraph gr( "Forcing libDataflowRendering.so to be loaded" );
20+
}
21+
#endif
1222
SECTION( "Loads and inspect a rendering graph graph" ) {
1323
auto g = DataflowGraph::loadGraphFromJsonFile( "data/Dataflow/fullRenderingGraph.json" );
1424

0 commit comments

Comments
 (0)