Skip to content

Commit f963e68

Browse files
Avoid PROJECT_SOURCE_DIR and make_unique when building blackbox tests (#6140) (#6144)
* Refs #23637. Avoid `PROJECT_SOURCE_DIR` when building blackbox tests. * Refs #23637. Remove calls to `make_unique`. --------- (cherry picked from commit 60f83e5) Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
1 parent dc6a65a commit f963e68

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/blackbox/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ if(FASTDDS_PIM_API_TESTS)
218218
)
219219
target_include_directories(BlackboxTests_DDS_PIM PRIVATE
220220
${Asio_INCLUDE_DIR}
221-
api/dds-pim
222-
${PROJECT_SOURCE_DIR}/test/utils)
221+
${CMAKE_CURRENT_SOURCE_DIR}/api/dds-pim
222+
${CMAKE_CURRENT_SOURCE_DIR}/../utils)
223223
target_link_libraries(BlackboxTests_DDS_PIM
224224
fastdds
225225
fastcdr

test/blackbox/common/BlackboxTestsDeadlineQos.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ TEST_P(DeadlineQos, KeyedTopicBestEffortReaderVolatileWriterSetDeadline)
324324
TEST_P(DeadlineQos, ZeroDeadlinePeriodWriter)
325325
{
326326
auto observer = std::make_shared<eprosima::fastdds::testing::LogCounterObserver>(/*store=*/ false);
327-
auto consumer = std::make_unique<eprosima::fastdds::testing::LogCounterConsumer>(observer);
327+
std::unique_ptr<eprosima::fastdds::testing::LogCounterConsumer> consumer;
328+
consumer.reset(new eprosima::fastdds::testing::LogCounterConsumer(observer));
328329

329330
fastlog::ClearConsumers();
330331
fastlog::RegisterConsumer(std::move(consumer));
@@ -420,7 +421,8 @@ TEST_P(DeadlineQos, ZeroDeadlinePeriodReader)
420421
ASSERT_TRUE(writer.isInitialized());
421422

422423
auto observer = std::make_shared<eprosima::fastdds::testing::LogCounterObserver>(/*store=*/ false);
423-
auto consumer = std::make_unique<eprosima::fastdds::testing::LogCounterConsumer>(observer);
424+
std::unique_ptr<eprosima::fastdds::testing::LogCounterConsumer> consumer;
425+
consumer.reset(new eprosima::fastdds::testing::LogCounterConsumer(observer));
424426

425427
fastlog::ClearConsumers();
426428
fastlog::RegisterConsumer(std::move(consumer));

0 commit comments

Comments
 (0)