summaryrefslogtreecommitdiffstats
path: root/kio/tests/CMakeLists.txt
blob: 0800c6f539f96bf17c8477ca04f540aeed8758e8 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#################################################
#
#  (C) 2010 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

include_directories(
  ${TQT_INCLUDE_DIRS}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}/dcop
  ${CMAKE_BINARY_DIR}/kdecore
  ${CMAKE_SOURCE_DIR}/kdecore
  ${CMAKE_SOURCE_DIR}/kdeui
  ${CMAKE_SOURCE_DIR}/kio
  ${CMAKE_SOURCE_DIR}/kio/kfile
  ${CMAKE_SOURCE_DIR}/kio/kio
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### ktradertest ###############################

set( target ktradertest )

set( ${target}_SRCS
  ktradertest.cpp
)

tde_add_executable( ${target}
  SOURCES ${${target}_SRCS}
  LINK kio-shared
  DESTINATION ${BIN_INSTALL_DIR}
)


##### check and test ##############################

# Force assertions to work
add_definitions( -UNDEBUG )

set( CHECKS
  getalltest jobtest kdcopcheck kdefaultprogresstest kdirlistertest
  kdirwatchtest kfiltertest kionetrctest kiopassdlgtest kmfitest kmimefromext
  kmimemagictest kpropsdlgtest kprotocolinfotest kruntest kscantest kshredtest
  ktartest kurifiltertest kurlcompletiontest kziptest metatest netaccesstest
  previewtest speed kioslavetest ksycocatest ksycocaupdatetest
  kmimetypetest
)

foreach( _check ${CHECKS} )
  tde_add_check_executable( ${_check} AUTOMOC LINK kio-shared )
endforeach( )

# NOTE some apps here are suitable to be run as tests but not included due to
#      following reasons:
#  - jobtest may fail if run on an unusual system configuration
#            and requires GUI
#  - kprotocolinfotest tries to connect to network and requires running DCOP
#  - kurifiltertest requires network access and GUI
#  - ksycocatest requires installed kdebase and GUI

set( TESTS dataprotocoltest kacltest )

foreach( _check ${TESTS} )
    tde_add_check_executable( ${_check} AUTOMOC LINK kio-shared TEST)
endforeach( )


configure_file( kmimetypetest.sh.cmake kmimetypetest.sh @ONLY )

add_test( NAME "kio/kmimetypetest"
    COMMAND sh -x "${CMAKE_CURRENT_BINARY_DIR}/kmimetypetest.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
set_tests_properties( "kio/kmimetypetest" PROPERTIES TIMEOUT 30)


# TODO add kdirwatchunittest