Skip to content

Commit bf29fcd

Browse files
fsfodvgvassilev
authored andcommitted
Make the DynamicLibraryManagerTests pass
1 parent c008239 commit bf29fcd

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

unittests/CppInterOp/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ target_link_libraries(DynamicLibraryManagerTests
2828
clangCppInterOp
2929
)
3030

31+
set_output_directory(DynamicLibraryManagerTests BINARY_DIR ${CMAKE_BINARY_DIR}/unittests/bin/$<CONFIG>/)
32+
3133
add_dependencies(DynamicLibraryManagerTests TestSharedLib)
3234
#export_executable_symbols_for_plugins(TestSharedLib)
3335
add_subdirectory(TestSharedLib)

unittests/CppInterOp/DynamicLibraryManagerTest.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ TEST(DynamicLibraryManagerTest, Sanity) {
4141
<< "'";
4242

4343
EXPECT_TRUE(Cpp::LoadLibrary(PathToTestSharedLib.c_str()));
44-
44+
// Force ExecutionEngine to be created.
45+
Cpp::Process("");
4546
// FIXME: Conda returns false to run this code on osx.
4647
#ifndef __APPLE__
4748
EXPECT_TRUE(Cpp::GetFunctionAddress("ret_zero"));

unittests/CppInterOp/TestSharedLib/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add_llvm_library(TestSharedLib
55
TestSharedLib.cpp)
66
# Put TestSharedLib next to the unit test executable.
77
set_output_directory(TestSharedLib
8-
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../
9-
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../
8+
BINARY_DIR ${CMAKE_BINARY_DIR}/unittests/bin/$<CONFIG>/
9+
LIBRARY_DIR ${CMAKE_BINARY_DIR}/unittests/bin/$<CONFIG>/
1010
)
1111
set_target_properties(TestSharedLib PROPERTIES FOLDER "Tests")

0 commit comments

Comments
 (0)