Skip to content

Commit 25e5c22

Browse files
committed
Fix tests on Windows
1 parent 0f15ba8 commit 25e5c22

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/conan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
if: runner.os != 'Linux'
5252
working-directory: ./build
5353
run: |
54-
ctest --output-on-failure
54+
ctest --output-on-failure -C ${{ matrix.build_type }}

test/owncloud_add_test.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ function(owncloud_add_test test_class)
2525
set_property(TEST ${OWNCLOUD_TEST_CLASS}Test PROPERTY ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
2626
endif()
2727

28+
if(WIN32)
29+
set(dll_paths $<TARGET_RUNTIME_DLL_DIRS:${OWNCLOUD_TEST_CLASS}Test>)
30+
set_property(TEST ${OWNCLOUD_TEST_CLASS}Test PROPERTY ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<JOIN:${dll_paths},\\\;>")
31+
endif()
32+
2833
foreach(arg IN LISTS ARGN)
2934
target_sources(${OWNCLOUD_TEST_CLASS}Test PRIVATE ${arg})
3035
endforeach()

0 commit comments

Comments
 (0)