1 set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
3 find_package(Qt${QT_MAJOR_VERSION}Test CONFIG REQUIRED)
6 include(FindGem) # For servicemenutest, see bottom of this file
9 ecm_add_test(kitemsettest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
12 ecm_add_test(kitemrangetest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
15 # KItemListSelectionManagerTest
16 ecm_add_test(kitemlistselectionmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
18 # KItemListControllerTest
19 ecm_add_test(kitemlistcontrollertest.cpp testdir.cpp
20 TEST_NAME kitemlistcontrollertest
21 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
23 # KFileItemListViewTest
24 ecm_add_test(kfileitemlistviewtest.cpp testdir.cpp
25 TEST_NAME kfileitemlistviewtest
26 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
29 ecm_add_test(kfileitemmodeltest.cpp testdir.cpp
30 TEST_NAME kfileitemmodeltest
31 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
33 # KFileItemModelBenchmark, not run automatically with `ctest` or `make test`
34 add_executable(kfileitemmodelbenchmark kfileitemmodelbenchmark.cpp testdir.cpp)
35 target_link_libraries(kfileitemmodelbenchmark dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
37 # KItemListKeyboardSearchManagerTest
38 ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
42 ecm_add_test(dolphinsearchboxtest.cpp
43 TEST_NAME dolphinsearchboxtest
44 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
49 ecm_add_test(dolphinquerytest.cpp
50 TEST_NAME dolphinquerytest
51 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
55 ecm_add_test(viewpropertiestest.cpp testdir.cpp
56 TEST_NAME viewpropertiestest
57 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
59 # DolphinMainWindowTest
60 ecm_add_test(dolphinmainwindowtest.cpp testdir.cpp ${CMAKE_SOURCE_DIR}/src/dolphin.qrc
61 TEST_NAME dolphinmainwindowtest
62 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
64 # DragAndDropHelperTest
65 ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
68 set_package_properties(Gem:test-unit PROPERTIES
70 DESCRIPTION "Ruby gem 'test-unit' required for testing of servicemenu helpers.")
71 if (Gem:test-unit_FOUND)
72 add_test(NAME servicemenutest
73 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../settings/contextmenu/test/test_run.rb)