Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Commit 992b43e

Browse files
authored
Fix dynamic load test (#100)
Signed-off-by: Isaac Hier <[email protected]>
1 parent e49f7cb commit 992b43e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,12 @@ if(BUILD_TESTING)
248248
src/jaegertracing/testutils/TracerUtil.cpp)
249249
target_link_libraries(testutils PUBLIC ${JAEGERTRACING_LIB})
250250

251+
if(BUILD_SHARED_LIBS)
252+
set(dynamic_load_test_src src/jaegertracing/DynamicLoadTest.cpp)
253+
endif()
251254
add_executable(UnitTest
252255
src/jaegertracing/ConfigTest.cpp
256+
${dynamic_load_test_src}
253257
src/jaegertracing/ReferenceTest.cpp
254258
src/jaegertracing/SpanContextTest.cpp
255259
src/jaegertracing/SpanTest.cpp
@@ -284,9 +288,9 @@ if(BUILD_TESTING)
284288

285289
if(TARGET jaegertracing)
286290
add_executable(DynamicallyLoadTracerTest
287-
src/jaegertracing/DynamicLoadTest.cpp
288291
src/jaegertracing/DynamicallyLoadTracerTest.cpp)
289292
target_include_directories(DynamicallyLoadTracerTest PUBLIC
293+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
290294
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>)
291295
target_link_libraries(
292296
DynamicallyLoadTracerTest OpenTracing::opentracing-static GTest::main)

src/jaegertracing/DynamicLoadTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ TEST(DynamicLoad, invalidVersion)
6565
const void* errorCategory = nullptr;
6666
void* tracerFactory = nullptr;
6767
const auto rcode = OpenTracingMakeTracerFactory(
68-
"1.0.0" /*invalid version*/, &errorCategory, &tracerFactory);
68+
"0.0.0" /*invalid version*/, &errorCategory, &tracerFactory);
6969
ASSERT_EQ(rcode, opentracing::incompatible_library_versions_error.value());
7070
ASSERT_EQ(
7171
errorCategory,

0 commit comments

Comments
 (0)