summaryrefslogtreecommitdiff
path: root/kimap
diff options
context:
space:
mode:
Diffstat (limited to 'kimap')
-rw-r--r--kimap/CMakeLists.txt1
-rw-r--r--kimap/tests/CMakeLists.txt52
-rw-r--r--kimap/tests/kimaptest/CMakeLists.txt12
-rw-r--r--kimap/tests/kimaptest/fakeserver.cpp7
4 files changed, 35 insertions, 37 deletions
diff --git a/kimap/CMakeLists.txt b/kimap/CMakeLists.txt
index e8a7b79..b9ef7c4 100644
--- a/kimap/CMakeLists.txt
+++ b/kimap/CMakeLists.txt
@@ -1,4 +1,5 @@
project(kimap)
+add_subdirectory( tests )
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
cmake_minimum_required(VERSION 2.6)
diff --git a/kimap/tests/CMakeLists.txt b/kimap/tests/CMakeLists.txt
index 8aa657a..b7455c1 100644
--- a/kimap/tests/CMakeLists.txt
+++ b/kimap/tests/CMakeLists.txt
@@ -1,7 +1,7 @@
add_subdirectory(kimaptest)
-include_directories( ${CMAKE_SOURCE_DIR}/kimap ${Boost_INCLUDE_DIR})
-set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
+#include_directories( ${CMAKE_SOURCE_DIR}/kimap ${Boost_INCLUDE_DIR})
+#set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
MACRO(KIMAP_UNIT_TESTS)
FOREACH(_testname ${ARGN})
@@ -23,30 +23,30 @@ 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
-)
+#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
-)
+#KIMAP_EXECUTABLE_TESTS(
+# testimapidle
+# testimapserver
+#)
diff --git a/kimap/tests/kimaptest/CMakeLists.txt b/kimap/tests/kimaptest/CMakeLists.txt
index 80723fa..cc11183 100644
--- a/kimap/tests/kimaptest/CMakeLists.txt
+++ b/kimap/tests/kimaptest/CMakeLists.txt
@@ -1,7 +1,5 @@
project(kimaptest)
-if(KDE4_BUILD_TESTS)
-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
set(kimaptest_LIB_SRCS
@@ -9,9 +7,11 @@ set(kimaptest_LIB_SRCS
mockjob.cpp
)
-kde4_add_library(kimaptest STATIC ${kimaptest_LIB_SRCS})
-target_link_libraries(kimaptest ${KDE4_KDECORE_LIBS} ${QT_QTNETWORK_LIBRARY} ${QT_QTTEST_LIBRARY} kimap)
-install(TARGETS kimaptest ${INSTALL_TARGETS_DEFAULT_ARGS})
+find_package(Qt4 4.6.0 REQUIRED)
+include_directories(${QT_INCLUDES})
+add_library(calendaring-kimaptest STATIC ${kimaptest_LIB_SRCS})
+target_link_libraries(calendaring-kimaptest ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTTEST_LIBRARY} calendaring-kimap)
+install(TARGETS calendaring-kimaptest ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
@@ -20,5 +20,3 @@ install(FILES
mockjob.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kimaptest COMPONENT Devel)
-endif()
-
diff --git a/kimap/tests/kimaptest/fakeserver.cpp b/kimap/tests/kimaptest/fakeserver.cpp
index 816f80f..24ce7cc 100644
--- a/kimap/tests/kimaptest/fakeserver.cpp
+++ b/kimap/tests/kimaptest/fakeserver.cpp
@@ -24,12 +24,11 @@
// Qt
#include <QDebug>
+#include <QFile>
+#include <QTest>
#include <QTcpServer>
// KDE
-#include <KDebug>
-#include <qtest_kde.h>
-
#include "kimap/imapstreamparser.h"
QByteArray FakeServer::preauth()
@@ -93,7 +92,7 @@ void FakeServer::run()
{
m_tcpServer = new QTcpServer();
if ( !m_tcpServer->listen( QHostAddress( QHostAddress::LocalHost ), 5989 ) ) {
- kFatal() << "Unable to start the server";
+ qFatal("Unable to start the server");
}
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection()));