]> cloud.milkyroute.net Git - dolphin.git/blob - src/tests/CMakeLists.txt
d4a7457cb55d5c4fcb8492197b189a01f9b40715
[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 # KFileItemListViewTest
24 ecm_add_test(kfileitemlistviewtest.cpp testdir.cpp
25 TEST_NAME kfileitemlistviewtest
26 LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
27
28 # KFileItemModelTest
29 ecm_add_test(kfileitemmodeltest.cpp testdir.cpp
30 TEST_NAME kfileitemmodeltest
31 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
32
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)
36
37 # KItemListKeyboardSearchManagerTest
38 ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
39
40 # DolphinSearchBox
41 if (KF5Baloo_FOUND)
42 ecm_add_test(dolphinsearchboxtest.cpp
43 TEST_NAME dolphinsearchboxtest
44 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
45 endif()
46
47 # DolphinQuery
48 if (KF5Baloo_FOUND)
49 ecm_add_test(dolphinquerytest.cpp
50 TEST_NAME dolphinquerytest
51 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
52 endif()
53
54 # ViewPropertiesTest
55 ecm_add_test(viewpropertiestest.cpp testdir.cpp
56 TEST_NAME viewpropertiestest
57 LINK_LIBRARIES dolphinprivate dolphinstatic Qt${QT_MAJOR_VERSION}::Test)
58
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)
63
64 # DragAndDropHelperTest
65 ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt${QT_MAJOR_VERSION}::Test)
66
67 find_gem(test-unit)
68 set_package_properties(Gem:test-unit PROPERTIES
69 TYPE RECOMMENDED
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)
74 endif()