summaryrefslogtreecommitdiff
path: root/kimap/tests/CMakeLists.txt
blob: 8aa657a28bbcfb03b885d712805dad8a9441b48c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
add_subdirectory(kimaptest)

include_directories( ${CMAKE_SOURCE_DIR}/kimap ${Boost_INCLUDE_DIR})
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )

MACRO(KIMAP_UNIT_TESTS)
  FOREACH(_testname ${ARGN})
    kde4_add_unit_test(${_testname} TESTNAME kimap-${_testname} NOGUI ${_testname}.cpp)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
    target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY}
                          kimap kimaptest kmime)
    add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")
  ENDFOREACH(_testname)
ENDMACRO(KIMAP_UNIT_TESTS)

MACRO(KIMAP_EXECUTABLE_TESTS)
  FOREACH(_testname ${ARGN})
    kde4_add_executable(${_testname} NOGUI TEST ${_testname}.cpp)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
    target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} kimap kmime)
  ENDFOREACH(_testname)
ENDMACRO(KIMAP_EXECUTABLE_TESTS)

########### automated tests ###############

KIMAP_UNIT_TESTS(
  fakeservertest
  testrfccodecs
  testsession
  loginjobtest
  logoutjobtest
  capabilitiesjobtest
  selectjobtest
  createjobtest
  deletejobtest
  fetchjobtest
  renamejobtest
  subscribejobtest
  unsubscribejobtest
  listjobtest
  storejobtest
  imapsettest
  idlejobtest
  quotarootjobtest
)

###########   manual tests  ###############

KIMAP_EXECUTABLE_TESTS(
  testimapidle
  testimapserver
)