Warning, /pim/kdepim-runtime/resources/mixedmaildir/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(ECMAddTests) 0002 0003 if(${EXECUTABLE_OUTPUT_PATH}) 0004 set( PREVIOUS_EXEC_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH} ) 0005 else() 0006 set( PREVIOUS_EXEC_OUTPUT_PATH . ) 0007 endif() 0008 set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) 0009 0010 kde_enable_exceptions() 0011 0012 include_directories( 0013 ${CMAKE_CURRENT_SOURCE_DIR}/../ 0014 ${CMAKE_CURRENT_BINARY_DIR}/../ 0015 ${CMAKE_CURRENT_SOURCE_DIR} 0016 ) 0017 0018 # test data 0019 set( testdata_SRCS 0020 ${testdata_generated_SRCS} 0021 testdatautil.cpp testdatautil.h 0022 ../mixedmaildir_debug.cpp 0023 testdata.qrc 0024 ) 0025 0026 0027 add_executable(testdatatest testdatatest.cpp ${testdata_SRCS}) 0028 add_test(NAME testdatatest COMMAND testdatatest) 0029 ecm_mark_as_test(mixedmaildir-testdatatest) 0030 0031 target_link_libraries( 0032 testdatatest 0033 Qt::Test 0034 ) 0035 0036 # put the libraries all tests link against into a variable and use it 0037 # in target_link_libraries instead 0038 set( common_link_libraries 0039 kmindexreader 0040 maildir 0041 akonadi-filestore 0042 KPim6::AkonadiMime 0043 KPim6::AkonadiCore 0044 KPim6::Mbox 0045 KPim6::Mime 0046 Qt::Test 0047 KF6::I18n 0048 ) 0049 0050 # test for overwritten methods 0051 add_executable(templatemethodstest ../mixedmaildirstore.cpp templatemethodstest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp) 0052 add_test(NAME templatemethodstest COMMAND templatemethodstest) 0053 ecm_mark_as_test(mixedmaildir-templatemethodtest) 0054 0055 0056 target_link_libraries( 0057 templatemethodstest 0058 ${common_link_libraries} 0059 ) 0060 0061 # test for collection creation handling 0062 add_executable(collectioncreatetest ../mixedmaildirstore.cpp collectioncreatetest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp) 0063 add_test(NAME collectioncreatetest COMMAND collectioncreatetest) 0064 ecm_mark_as_test(mixedmaildir-collectioncreatetest) 0065 0066 0067 target_link_libraries( 0068 collectioncreatetest 0069 ${common_link_libraries} 0070 ) 0071 0072 # test for collection deletion handling 0073 add_executable(collectiondeletetest ../mixedmaildirstore.cpp collectiondeletetest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp) 0074 add_test(NAME collectiondeletetest COMMAND collectiondeletetest) 0075 ecm_mark_as_test(mixedmaildir-collectiondeletetest) 0076 0077 target_link_libraries( 0078 collectiondeletetest 0079 ${common_link_libraries} 0080 ) 0081 0082 # test for collection fetching handling 0083 add_executable( collectionfetchtest ../mixedmaildirstore.cpp collectionfetchtest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp) 0084 add_test(NAME collectionfetchtest COMMAND collectionfetchtest) 0085 ecm_mark_as_test(mixedmaildir-collectionfetchtest) 0086 0087 0088 target_link_libraries( 0089 collectionfetchtest 0090 ${common_link_libraries} 0091 ) 0092 0093 # test for collection modification handling 0094 add_executable( collectionmodifytest ../mixedmaildirstore.cpp 0095 collectionmodifytest.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp 0096 ${testdata_SRCS} 0097 ) 0098 add_test(NAME collectionmodifytest COMMAND collectionmodifytest) 0099 ecm_mark_as_test(mixedmaildir-collectionmodifytest) 0100 0101 0102 target_link_libraries( 0103 collectionmodifytest 0104 ${common_link_libraries} 0105 ) 0106 0107 # test for collection move handling 0108 add_executable( collectionmovetest ../mixedmaildirstore.cpp ../mixedmaildir_debug.cpp 0109 collectionmovetest.cpp ../mixedmaildirresource_debug.cpp 0110 ${testdata_SRCS} 0111 ) 0112 add_test(NAME collectionmovetest COMMAND collectionmovetest) 0113 ecm_mark_as_test(mixedmaildir-collectionmovetest) 0114 0115 target_link_libraries( 0116 collectionmovetest 0117 ${common_link_libraries} 0118 ) 0119 0120 # test for item creation handling 0121 add_executable(itemcreatetest ../mixedmaildirstore.cpp ../mixedmaildir_debug.cpp ../mixedmaildirresource_debug.cpp 0122 itemcreatetest.cpp 0123 ${testdata_SRCS} 0124 ) 0125 add_test(NAME itemcreatetest COMMAND itemcreatetest) 0126 ecm_mark_as_test(mixedmaildir-itemcreatetest) 0127 0128 0129 target_link_libraries( 0130 itemcreatetest 0131 ${common_link_libraries} 0132 ) 0133 0134 # test for item creation handling 0135 add_executable(itemdeletetest ../mixedmaildirstore.cpp 0136 itemdeletetest.cpp ../mixedmaildirresource_debug.cpp 0137 ${testdata_SRCS} 0138 ) 0139 add_test(NAME itemdeletetest COMMAND itemdeletetest) 0140 ecm_mark_as_test(mixedmaildir-itemdeletetest) 0141 0142 0143 target_link_libraries( 0144 itemdeletetest 0145 ${common_link_libraries} 0146 ) 0147 #REACTIVATE IT 0148 if (0) 0149 # test for item retrieval handling 0150 add_executable(itemfetchtest ../mixedmaildirstore.cpp ../mixedmaildirresource_debug.cpp 0151 itemfetchtest.cpp 0152 ${testdata_SRCS} 0153 ) 0154 add_test(NAME itemfetchtest COMMAND itemfetchtest) 0155 ecm_mark_as_test(mixedmaildir-itemfetchtest) 0156 0157 target_link_libraries( 0158 itemfetchtest 0159 ${common_link_libraries} 0160 ) 0161 endif() 0162 0163 # test for item modification handling 0164 add_executable(itemmodifytest ../mixedmaildirstore.cpp ../mixedmaildirresource_debug.cpp 0165 itemmodifytest.cpp 0166 ${testdata_SRCS} 0167 ) 0168 add_test(NAME itemmodifytest COMMAND itemmodifytest) 0169 ecm_mark_as_test( mixedmaildir-itemmodifytest) 0170 0171 target_link_libraries( 0172 itemmodifytest 0173 ${common_link_libraries} 0174 ) 0175 0176 # test for item move handling 0177 add_executable(itemmovetest ../mixedmaildirstore.cpp ../mixedmaildirresource_debug.cpp 0178 itemmovetest.cpp 0179 ${testdata_SRCS} 0180 ) 0181 add_test(NAME itemmovetest COMMAND itemmovetest) 0182 ecm_mark_as_test(mixedmaildir-itemmovetest) 0183 0184 0185 target_link_libraries( 0186 itemmovetest 0187 ${common_link_libraries} 0188 ) 0189 0190 # test for store compact handling 0191 add_executable(storecompacttest ../mixedmaildirstore.cpp ../mixedmaildirresource_debug.cpp 0192 storecompacttest.cpp 0193 ${testdata_SRCS} 0194 ) 0195 add_test(NAME storecompacttest COMMAND storecompacttest) 0196 ecm_mark_as_test(mixedmaildir-storecompacttest) 0197 0198 0199 target_link_libraries( 0200 storecompacttest 0201 ${common_link_libraries} 0202 )