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

Add support for FastDDS versions earlier than 2.13 #424

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
27 changes: 17 additions & 10 deletions ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@
set(TEST_NAME
DDSTestWAN)

# Determine Fast DDS version
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
set(DDS_TYPES_VERSION "v1")
else()
set(DDS_TYPES_VERSION "v2")
endif()

set(TEST_SOURCES
DDSTestWAN.cpp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorld.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyed.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
DDSTestWAN.cpp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)

set(TEST_LIST
end_to_end_discovery_server_WAN_communication_UDPv4
Expand Down Expand Up @@ -63,7 +70,7 @@ set(TEST_NEEDED_SOURCES
)

set(TEST_EXTRA_HEADERS
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)

add_blackbox_executable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@
set(TEST_NAME
DDSTestLocal)

# Determine Fast DDS version
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
set(DDS_TYPES_VERSION "v1")
else()
set(DDS_TYPES_VERSION "v2")
endif()

set(TEST_SOURCES
DDSTestLocal.cpp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorld.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyed.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)

set(TEST_LIST
end_to_end_local_communication
Expand All @@ -45,8 +52,8 @@ set(TEST_NEEDED_SOURCES
)

set(TEST_EXTRA_HEADERS
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed,
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed,
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)

add_blackbox_executable(
Expand All @@ -65,14 +72,14 @@ set(TEST_NAME

set(TEST_SOURCES
DDSTestLocalDisposeKey.cpp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorld.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyed.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)

set(TEST_LIST
end_to_end_local_communication_key_dispose)
Expand All @@ -81,7 +88,7 @@ set(TEST_NEEDED_SOURCES
)

set(TEST_EXTRA_HEADERS
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed,
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed,
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)

add_blackbox_executable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ DdsRouterConfiguration dds_test_simple_configuration(
* The transient_local option changes the test behavior to verify that the communication is transient_local and all old data is sent
* to Late Joiners.
*/
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
template <class MsgStruct>
#else
template <class MsgStruct, class MsgStructType>
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
void test_local_communication(
DdsRouterConfiguration ddsrouter_configuration,
uint32_t samples_to_receive = DEFAULT_SAMPLES_TO_RECEIVE,
Expand All @@ -130,7 +134,10 @@ void test_local_communication(

// Create a message with size specified by repeating the same string
MsgStruct msg;

#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
MsgStructType type;
#endif // if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13

std::string msg_str;

Expand All @@ -142,11 +149,21 @@ void test_local_communication(
msg.message(msg_str);

// Create DDS Publisher in domain 0
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestPublisher<MsgStruct> publisher(msg.isKeyDefined());
#else
TestPublisher<MsgStruct> publisher(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(publisher.init(0));

// Create DDS Subscriber in domain 1
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestSubscriber<MsgStruct> subscriber(msg.isKeyDefined(), transient_local);
#else
TestSubscriber<MsgStruct> subscriber(type.m_isGetKeyDefined, transient_local);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(subscriber.init(1, &msg, &samples_received));

// Create DdsRouter entity
Expand Down Expand Up @@ -209,8 +226,14 @@ void test_local_communication(
*/
TEST(DDSTestLocal, end_to_end_local_communication)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration());
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration());
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

}

/**
Expand All @@ -219,8 +242,13 @@ TEST(DDSTestLocal, end_to_end_local_communication)
*/
TEST(DDSTestLocal, end_to_end_local_communication_keyed)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration());
#else
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration());
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -230,14 +258,24 @@ TEST(DDSTestLocal, end_to_end_local_communication_keyed)
*/
TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true));
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true));
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keyed)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration(true));
#else
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration(true));
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -249,10 +287,17 @@ TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keye
*/
TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -264,11 +309,19 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
*/
TEST(DDSTestLocal, end_to_end_local_communication_high_size)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
10000); // 500K message size
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -282,11 +335,19 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_size)
*/
TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
1000); // 50K message size
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -295,12 +356,21 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
*/
TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

/**
Expand All @@ -309,12 +379,21 @@ TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
*/
TEST(DDSTestLocal, end_to_end_local_communication_transient_local_disable_dynamic_discovery)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

int main(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ void test_local_communication_key_dispose(

// Create a message with size specified by repeating the same string
HelloWorldKeyed msg;

#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
HelloWorldKeyedPubSubType type;
#endif // if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13

std::string msg_str;

// Add this string as many times as the msg size requires
Expand All @@ -110,11 +114,21 @@ void test_local_communication_key_dispose(
msg.id(666);

// Create DDS Publisher in domain 0
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestPublisher<HelloWorldKeyed> publisher(msg.isKeyDefined());
#else
TestPublisher<HelloWorldKeyed> publisher(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(publisher.init(0));

// Create DDS Subscriber in domain 1
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestSubscriber<HelloWorldKeyed> subscriber(msg.isKeyDefined());
#else
TestSubscriber<HelloWorldKeyed> subscriber(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(subscriber.init(1, &msg, &samples_received));

// Create DdsRouter entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@
set(TEST_NAME
DDSTestRepeater)

# Determine Fast DDS version
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
set(DDS_TYPES_VERSION "v1")
else()
set(DDS_TYPES_VERSION "v2")
endif()

set(TEST_SOURCES
DDSTestRepeater.cpp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorld.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyed.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedv1.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)

set(TEST_LIST
repeater_initial_peers_communication_UDPv4
Expand All @@ -38,7 +45,7 @@ set(TEST_NEEDED_SOURCES
)

set(TEST_EXTRA_HEADERS
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)

add_blackbox_executable(
Expand Down
Loading
Loading