]> cloud.milkyroute.net Git - dolphin.git/blob - src/tests/CMakeLists.txt
Merge branch 'master' into kf6
[dolphin.git] / src / tests / CMakeLists.txt
1 set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
2
3 find_package(Qt${QT_MAJOR_VERSION}Test CONFIG REQUIRED)
4 include(ECMAddTests)
5
6 include(FindGem) # For servicemenutest, see bottom of this file
7
8 # KItemSetTest
9 ecm_add_test(kitemsettest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
10
11 # KItemRangeTest
12 ecm_add_test(kitemrangetest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
13
14
15 # KItemListSelectionManagerTest
16 ecm_add_test(kitemlistselectionmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
17
18 # KItemListControllerTest
19 ecm_add_test(kitemlistcontrollertest.cpp testdir.cpp
20 TEST_NAME kitemlistcontrollertest
21 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
22
23 # KItemListControllerExpandTest
24 ecm_add_test(kitemlistcontrollerexpandtest.cpp testdir.cpp
25 TEST_NAME kitemlistcontrollerexpandtest
26 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
27
28 # KFileItemListViewTest
29 ecm_add_test(kfileitemlistviewtest.cpp testdir.cpp
30 TEST_NAME kfileitemlistviewtest
31 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
32
33 # KFileItemModelTest
34 ecm_add_test(kfileitemmodeltest.cpp testdir.cpp
35 TEST_NAME kfileitemmodeltest
36 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
37
38 # KFileItemModelBenchmark, not run automatically with `ctest` or `make test`
39 add_executable(kfileitemmodelbenchmark kfileitemmodelbenchmark.cpp testdir.cpp)
40 target_link_libraries(kfileitemmodelbenchmark dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
41
42 # KItemListKeyboardSearchManagerTest
43 ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
44
45 # DolphinSearchBox
46 if (KF6Baloo_FOUND)
47 ecm_add_test(dolphinsearchboxtest.cpp
48 TEST_NAME dolphinsearchboxtest
49 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
50 endif()
51
52 # DolphinQuery
53 if (KF6Baloo_FOUND)
54 ecm_add_test(dolphinquerytest.cpp
55 TEST_NAME dolphinquerytest
56 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
57 endif()
58
59 # ViewPropertiesTest
60 ecm_add_test(viewpropertiestest.cpp testdir.cpp
61 TEST_NAME viewpropertiestest
62 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
63
64 # DolphinMainWindowTest
65 ecm_add_test(dolphinmainwindowtest.cpp testdir.cpp ${CMAKE_SOURCE_DIR}/src/dolphin.qrc
66 TEST_NAME dolphinmainwindowtest
67 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
68
69 # DragAndDropHelperTest
70 ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
71
72 find_gem(test-unit)
73 set_package_properties(Gem:test-unit PROPERTIES
74 TYPE RECOMMENDED
75 DESCRIPTION "Ruby gem 'test-unit' required for testing of servicemenu helpers.")
76 if (Gem:test-unit_FOUND)
77 add_test(NAME servicemenutest
78 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../settings/contextmenu/test/test_run.rb)
79 endif()