[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] [patch] akonadi/server/tests/unittest re-enabling
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2007-07-30 23:50:54
Message-ID: 200707310151.03754.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi again,

patch for re-enabling handlertest but make it QSKIP in case the configured 
database driver is MYSQL/Embedded (since according to a previous commit log 
this will make it fail)

Fixed typo in CMakeLists.txt (missing 't' at end of handlertest)

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["handlertest.diff" (text/x-diff)]

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(Revision 694519)
+++ CMakeLists.txt	(Arbeitskopie)
@@ -2,9 +2,6 @@
 
 set(handlertest_SRCS handlertest.cpp teststoragebackend.cpp )
 
+kde4_add_unit_test(handlertest TESTNAME akonadi-handlertest ${handlertest_SRCS})
 
-# FIXME: handlertest hangs because you can't open the mysql database twice
-#kde4_add_unit_test(handlertes TESTNAME akonadi-handlertest ${handlertest_SRCS})
-
-#target_link_libraries(handlertest akonadiprivate ${QT_QTTEST_LIBRARY})
-
+target_link_libraries(handlertest akonadiprivate ${QT_QTTEST_LIBRARY})
Index: handlertest.cpp
===================================================================
--- handlertest.cpp	(Revision 694519)
+++ handlertest.cpp	(Arbeitskopie)
@@ -17,6 +17,8 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
+#include <QtCore/QDir>
+#include <QtCore/QSettings>
 #include <QtCore/QMetaType>
 #include <QtCore/QVariant>
 
@@ -29,11 +31,17 @@
 
 void HandlerTest::initTestCase()
 {
+    // According to Volker (see log of Revision 623747), the handler test
+    // does not work with MYSQL/Embedded
+    QSettings settings( QDir::homePath() + \
QLatin1String("/.akonadi/akonadiserverrc"), QSettings::IniFormat ); +    if ( \
settings.value( QLatin1String("General/Driver"), QLatin1String( "QMYSQL" ) \
).toString() == QLatin1String( "QMYSQL_EMBEDDED" ) ) +        QSKIP( "HandlerTest \
does not work with MYSQL/Embedded", SkipAll ); +
     qRegisterMetaType<Response>("Response");
 }
 
 void HandlerTest::testInit()
-{ 
+{
 }
 
 /// ---- List ----


["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic