Skip to content

Commit

Permalink
[unittests][dataflowrendering] fix segfault on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasPaulin committed Feb 6, 2023
1 parent 6a78680 commit 1e73305
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/unittest/Dataflow/renderinggraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ using namespace Ra::Dataflow::Core;
using namespace Ra::Dataflow::Rendering;

TEST_CASE( "Dataflow/Rendering/RenderingGraph", "[Dataflow][Rendering][RenderingGraph]" ) {

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

Expand Down

0 comments on commit 1e73305

Please sign in to comment.