Skip to content

Commit ac1334c

Browse files
rootsec1lucydodo
authored andcommitted
test: expose database DLLs to Windows CTest
1 parent 6575518 commit ac1334c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/tests/CMakeLists.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ set(TESTGLOBALFILTER_HDR
9494
add_executable(test-global-filter ${TESTGLOBALFILTER_HDR} ${TESTGLOBALFILTER_SRC})
9595
target_link_libraries(test-global-filter ${QT_MAJOR}::Test ${QT_MAJOR}::Widgets ${LIBSQLITE_NAME} ${QT5_COMPAT})
9696
add_test(NAME test-global-filter COMMAND $<TARGET_FILE:test-global-filter>)
97+
if(WIN32)
98+
# SQLite and SQLCipher are built as DLLs in the CMake prefix by the Windows CI jobs.
99+
# Keep those prefixes on PATH while CTest launches this executable.
100+
string(REPLACE ";" "\\;" TESTGLOBALFILTER_PATH "${CMAKE_PREFIX_PATH};$ENV{PATH}")
101+
set_tests_properties(test-global-filter PROPERTIES ENVIRONMENT "PATH=${TESTGLOBALFILTER_PATH}")
102+
endif()
97103

98104
# test cache
99105

0 commit comments

Comments
 (0)