diff -Nru address-book-service-0.1.1+14.04.20140317.1/CMakeLists.txt address-book-service-0.1.1+14.04.20140318.2/CMakeLists.txt --- address-book-service-0.1.1+14.04.20140317.1/CMakeLists.txt 2014-03-17 16:33:51.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/CMakeLists.txt 2014-03-18 17:32:59.000000000 +0000 @@ -69,7 +69,12 @@ add_subdirectory(lib) add_subdirectory(src) add_subdirectory(qcontacts) -add_subdirectory(tests) add_subdirectory(data) +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc") + # Some tests fail when running on PPPC check bug #1294229 + message(STATUS "Tests disable for ppc") +else() + add_subdirectory(tests) +endif() configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) diff -Nru address-book-service-0.1.1+14.04.20140317.1/debian/changelog address-book-service-0.1.1+14.04.20140318.2/debian/changelog --- address-book-service-0.1.1+14.04.20140317.1/debian/changelog 2014-03-18 19:10:15.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/debian/changelog 2014-03-18 19:10:15.000000000 +0000 @@ -1,4 +1,4 @@ -address-book-service (0.1.1+14.04.20140317.1-0ubuntu1) trusty; urgency=low +address-book-service (0.1.1+14.04.20140318.2-0ubuntu1) trusty; urgency=low [ Ubuntu daily release ] * New rebuild forced @@ -10,7 +10,7 @@ [ Renato Araujo Oliveira Filho ] * Implemented createSource functionality. - -- Ubuntu daily release Mon, 17 Mar 2014 16:34:11 +0000 + -- Ubuntu daily release Tue, 18 Mar 2014 17:33:20 +0000 address-book-service (0.1.1+14.04.20140305-0ubuntu1) trusty; urgency=low diff -Nru address-book-service-0.1.1+14.04.20140317.1/lib/addressbook.cpp address-book-service-0.1.1+14.04.20140318.2/lib/addressbook.cpp --- address-book-service-0.1.1+14.04.20140317.1/lib/addressbook.cpp 2014-03-17 16:33:51.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/lib/addressbook.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -22,6 +22,7 @@ #include "view.h" #include "contacts-map.h" #include "qindividual.h" +#include "dirtycontact-notify.h" #include "common/vcard-parser.h" @@ -33,9 +34,6 @@ #include -//this timeout represents how long the server will wait for changes on the contact before notify the client -#define NOTIFY_CONTACTS_TIMEOUT 500 - using namespace QtContacts; namespace @@ -82,40 +80,6 @@ { int AddressBook::m_sigQuitFd[2] = {0, 0}; -// this is a helper class uses a timer with a small timeout to notify the client about -// any contact change notification. This class should be used instead of emit the signal directly -// this will avoid notify about the contact update several times when updating different fields simultaneously -// With that we can reduce the dbus traffic and skip some client calls to query about the new contact info. -class DirtyContactsNotify -{ -public: - DirtyContactsNotify(AddressBookAdaptor *adaptor) - { - m_timer.setInterval(NOTIFY_CONTACTS_TIMEOUT); - m_timer.setSingleShot(true); - QObject::connect(&m_timer, &QTimer::timeout, - [=]() { - Q_EMIT adaptor->contactsUpdated(m_ids); - m_ids.clear(); - }); - } - - void append(QStringList ids) - { - Q_FOREACH(QString id, ids) { - if (!m_ids.contains(id)) { - m_ids << id; - } - } - - m_timer.start(); - } - -private: - QTimer m_timer; - QStringList m_ids; -}; - AddressBook::AddressBook(QObject *parent) : QObject(parent), m_individualAggregator(0), @@ -186,6 +150,11 @@ return false; } +bool AddressBook::start() +{ + return start(QDBusConnection::sessionBus()); +} + void AddressBook::shutdown() { m_ready = false; @@ -227,7 +196,6 @@ void AddressBook::prepareFolks() { - qDebug() << "Prepare folks"; m_individualAggregator = FOLKS_INDIVIDUAL_AGGREGATOR_DUP(); g_object_get(G_OBJECT(m_individualAggregator), "is-quiescent", &m_ready, NULL); if (m_ready) { @@ -428,7 +396,7 @@ void AddressBook::individualChanged(QIndividual *individual) { - m_notifyContactUpdate->append(QStringList() << individual->id()); + m_notifyContactUpdate->append(QSet() << individual->id()); } int AddressBook::removeContacts(const QStringList &contactIds, const QDBusMessage &message) @@ -570,7 +538,7 @@ QDBusConnection::sessionBus().send(reply); // notify about the changes - m_notifyContactUpdate->append(m_updatedIds); + m_notifyContactUpdate->append(m_updatedIds.toSet()); // clear command data m_updatedIds.clear(); diff -Nru address-book-service-0.1.1+14.04.20140317.1/lib/addressbook.h address-book-service-0.1.1+14.04.20140318.2/lib/addressbook.h --- address-book-service-0.1.1+14.04.20140317.1/lib/addressbook.h 2014-03-17 16:33:51.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/lib/addressbook.h 2014-03-18 17:32:59.000000000 +0000 @@ -25,7 +25,6 @@ #include #include #include -#include #include @@ -50,8 +49,8 @@ AddressBook(QObject *parent=0); virtual ~AddressBook(); - static QString objectPath(); - bool start(QDBusConnection connection = QDBusConnection::sessionBus()); + static QString objectPath(); + bool start(QDBusConnection connection); // Adaptor QString linkContacts(const QStringList &contacts); @@ -65,7 +64,8 @@ Q_SIGNALS: void stopped(); -public Q_SLOTS: +public Q_SLOTS: + bool start(); void shutdown(); SourceList availableSources(const QDBusMessage &message); Source source(const QDBusMessage &message); diff -Nru address-book-service-0.1.1+14.04.20140317.1/lib/CMakeLists.txt address-book-service-0.1.1+14.04.20140318.2/lib/CMakeLists.txt --- address-book-service-0.1.1+14.04.20140317.1/lib/CMakeLists.txt 2014-03-17 16:33:51.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/lib/CMakeLists.txt 2014-03-18 17:32:59.000000000 +0000 @@ -7,6 +7,7 @@ addressbook-adaptor.cpp contacts-map.cpp detail-context-parser.cpp + dirtycontact-notify.cpp gee-utils.cpp qindividual.cpp source.cpp @@ -20,6 +21,7 @@ addressbook-adaptor.h contacts-map.h detail-context-parser.h + dirtycontact-notify.h gee-utils.h qindividual.h source.h diff -Nru address-book-service-0.1.1+14.04.20140317.1/lib/dirtycontact-notify.cpp address-book-service-0.1.1+14.04.20140318.2/lib/dirtycontact-notify.cpp --- address-book-service-0.1.1+14.04.20140317.1/lib/dirtycontact-notify.cpp 1970-01-01 00:00:00.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/lib/dirtycontact-notify.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright 2014 Canonical Ltd. + * + * This file is part of contact-service-app. + * + * contact-service-app is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * contact-service-app is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +//this timeout represents how long the server will wait for changes on the contact before notify the client +#define NOTIFY_CONTACTS_TIMEOUT 500 + +#include "dirtycontact-notify.h" +#include "addressbook-adaptor.h" + +namespace galera { + +DirtyContactsNotify::DirtyContactsNotify(AddressBookAdaptor *adaptor, QObject *parent) + : QObject(parent), + m_adaptor(adaptor) +{ + m_timer.setInterval(NOTIFY_CONTACTS_TIMEOUT); + m_timer.setSingleShot(true); + connect(&m_timer, SIGNAL(timeout()), SLOT(onTimeout())); +} + +void DirtyContactsNotify::append(QSet ids) +{ + m_ids += ids; + m_timer.start(); +} + +void DirtyContactsNotify::onTimeout() +{ + Q_EMIT m_adaptor->contactsUpdated(m_ids.toList()); + m_ids.clear(); +} + +} //namespace diff -Nru address-book-service-0.1.1+14.04.20140317.1/lib/dirtycontact-notify.h address-book-service-0.1.1+14.04.20140318.2/lib/dirtycontact-notify.h --- address-book-service-0.1.1+14.04.20140317.1/lib/dirtycontact-notify.h 1970-01-01 00:00:00.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/lib/dirtycontact-notify.h 2014-03-18 17:32:59.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Copyright 2014 Canonical Ltd. + * + * This file is part of contact-service-app. + * + * contact-service-app is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * contact-service-app is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __GALERA_DIRTYCONTACT_NOTIFY_H__ +#define __GALERA_DIRTYCONTACT_NOTIFY_H__ + +#include +#include +#include +#include +#include + +namespace galera { + +class AddressBookAdaptor; + +// this is a helper class uses a timer with a small timeout to notify the client about +// any contact change notification. This class should be used instead of emit the signal directly +// this will avoid notify about the contact update several times when updating different fields simultaneously +// With that we can reduce the dbus traffic and skip some client calls to query about the new contact info. +class DirtyContactsNotify : public QObject +{ + Q_OBJECT + +public: + DirtyContactsNotify(AddressBookAdaptor *adaptor, QObject *parent=0); + + void append(QSet ids); + +private Q_SLOTS: + void onTimeout(); + +private: + AddressBookAdaptor *m_adaptor; + QTimer m_timer; + QSet m_ids; +}; + +} //namespace + +#endif diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/addressbook-server.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/addressbook-server.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/addressbook-server.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/addressbook-server.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -19,6 +19,8 @@ #include "lib/addressbook.h" #include "dummy-backend.h" +#include + int main(int argc, char** argv) { galera::AddressBook::init(); @@ -30,9 +32,10 @@ // addressbook galera::AddressBook book; - book.start(); + book.connect(&dummy, SIGNAL(ready()), SLOT(start())); book.connect(&dummy, SIGNAL(stopped()), SLOT(shutdown())); + app.connect(&book, SIGNAL(stopped()), SLOT(quit())); return app.exec(); } diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/addressbook-test.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/addressbook-test.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/addressbook-test.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/addressbook-test.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -172,7 +172,7 @@ void testCreateContact() { // spy 'contactsAdded' signal - QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(const QStringList &))); + QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(QStringList))); // call create contact QDBusReply reply = m_serverIface->call("createContact", m_basicVcard, "dummy-store"); @@ -189,11 +189,8 @@ QCOMPARE(contactsCreated.count(), 1); compareContact(contactsCreated[0], newContact); - // wait for folks to emit the signal - QTest::qWait(500); - // check if the signal "contactAdded" was fired - QCOMPARE(addedContactSpy.count(), 1); + QTRY_COMPARE(addedContactSpy.count(), 1); QList args = addedContactSpy.takeFirst(); QCOMPARE(args.count(), 1); QStringList ids = args[0].toStringList(); @@ -203,13 +200,13 @@ void testDuplicateContact() { // spy 'contactsAdded' signal - QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(const QStringList &))); + QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(QStringList))); // call create contact first QDBusReply reply = m_serverIface->call("createContact", m_basicVcard, "dummy-store"); // wait for folks to emit the signal - QTest::qWait(500); + QTRY_COMPARE(addedContactSpy.count(), 1); // user returned id to fill the new vcard QString newContactId = reply.value(); @@ -225,13 +222,13 @@ QVERIFY(reply2.value().isEmpty()); // contactsAdded should be fired only once - QCOMPARE(addedContactSpy.count(), 1); + QTRY_COMPARE(addedContactSpy.count(), 1); } void testCreateInvalidContact() { // spy 'contactsAdded' signal - QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(const QStringList &))); + QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(QStringList))); // call create contact with a invalid vcard string QDBusReply reply = m_serverIface->call("createContact", "INVALID VCARD", "dummy-store"); @@ -246,11 +243,13 @@ void testRemoveContact() { // create a basic contact + QSignalSpy addedContactSpy(m_serverIface, SIGNAL(contactsAdded(QStringList))); QDBusReply replyAdd = m_serverIface->call("createContact", m_basicVcard, "dummy-store"); QString newContactId = replyAdd.value(); + QTRY_COMPARE(addedContactSpy.count(), 1); // spy 'contactsRemoved' signal - QSignalSpy removedContactSpy(m_serverIface, SIGNAL(contactsRemoved(const QStringList &))); + QSignalSpy removedContactSpy(m_serverIface, SIGNAL(contactsRemoved(QStringList))); // try remove the contact created QDBusReply replyRemove = m_serverIface->call("removeContacts", QStringList() << newContactId); @@ -281,7 +280,7 @@ QtContacts::QContact contactUpdated = contacts[0]; // spy 'contactsUpdated' signal - QSignalSpy updateContactSpy(m_serverIface, SIGNAL(contactsUpdated(const QStringList &))); + QSignalSpy updateContactSpy(m_serverIface, SIGNAL(contactsUpdated(QStringList))); QDBusReply replyUpdate = m_serverIface->call("updateContacts", QStringList() << vcard); QStringList result = replyUpdate.value(); QCOMPARE(result.size(), 1); diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/base-client-test.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/base-client-test.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/base-client-test.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/base-client-test.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -34,11 +34,15 @@ CPIM_ADDRESSBOOK_OBJECT_PATH, CPIM_ADDRESSBOOK_IFACE_NAME); QVERIFY(!m_serverIface->lastError().isValid()); + // wait for service to be ready + QTRY_COMPARE_WITH_TIMEOUT(m_serverIface->property("isReady").toBool(), true, 10000); m_dummyIface = new QDBusInterface(DUMMY_SERVICE_NAME, DUMMY_OBJECT_PATH, DUMMY_IFACE_NAME); QVERIFY(!m_dummyIface->lastError().isValid()); + // wait for service to be ready + QTRY_COMPARE_WITH_TIMEOUT(m_dummyIface->property("isReady").toBool(), true, 10000); } void BaseClientTest::init() diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/CMakeLists.txt address-book-service-0.1.1+14.04.20140318.2/tests/unittest/CMakeLists.txt --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/CMakeLists.txt 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/CMakeLists.txt 2014-03-18 17:32:59.000000000 +0000 @@ -23,13 +23,14 @@ if(${RUN_SERVER} STREQUAL "True") add_test(${TESTNAME} ${DBUS_RUNNER} + --keep-env --task ${CMAKE_CURRENT_BINARY_DIR}/address-book-server-test --task ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME} ${TEST_ARGS} --wait-for=com.canonical.pim) else() add_test(${TESTNAME} ${TESTNAME}) endif() - set(TEST_ENVIRONMENT "QT_QPA_PLATFORM=minimal\;FOLKS_BACKEND_PATH=${folks-dummy-backend_BINARY_DIR}/dummy.so") + set(TEST_ENVIRONMENT "QT_QPA_PLATFORM=minimal\;FOLKS_BACKEND_PATH=${folks-dummy-backend_BINARY_DIR}/dummy.so\;FOLKS_BACKENDS_ALLOWED=dummy") set_tests_properties(${TESTNAME} PROPERTIES ENVIRONMENT ${TEST_ENVIRONMENT} TIMEOUT ${CTEST_TESTING_TIMEOUT}) diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/contactmap-test.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/contactmap-test.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/contactmap-test.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/contactmap-test.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -76,6 +76,7 @@ { m_dummy = new DummyBackendProxy(); m_dummy->start(); + QTRY_VERIFY(m_dummy->isReady()); createContactWithSuffix("1"); createContactWithSuffix("2"); diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/dummy-backend.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/dummy-backend.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/dummy-backend.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/dummy-backend.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -45,12 +45,9 @@ void DummyBackendProxy::start(bool useDBus) { + m_useDBus = useDBus; initEnviroment(); initFolks(); - prepareAggregator(); - if (useDBus) { - registerObject(); - } } void DummyBackendProxy::shutdown() @@ -60,7 +57,6 @@ QDBusConnection connection = QDBusConnection::sessionBus(); connection.unregisterObject(DUMMY_OBJECT_PATH); connection.unregisterService(DUMMY_SERVICE_NAME); - qDebug() << "Unregister service; DUMMY"; delete m_adaptor; m_adaptor = 0; @@ -130,27 +126,11 @@ } void DummyBackendProxy::initFolks() -{ - ScopedEventLoop loop(&m_eventLoop); +{ m_backendStore = folks_backend_store_dup(); folks_backend_store_load_backends(m_backendStore, (GAsyncReadyCallback) DummyBackendProxy::backendStoreLoaded, this); - - loop.exec(); - - loop.reset(&m_eventLoop); - folks_backend_store_enable_backend(m_backendStore, "dummy", - (GAsyncReadyCallback) DummyBackendProxy::backendEnabled, - this); - loop.exec(); - - m_backend = FOLKS_DUMMY_BACKEND(folks_backend_store_dup_backend_by_name(m_backendStore, "dummy")); - - Q_ASSERT(m_backend != 0); - configurePrimaryStore(); - m_isReady = true; - Q_EMIT ready(); } bool DummyBackendProxy::isReady() const @@ -160,8 +140,6 @@ void DummyBackendProxy::prepareAggregator() { - ScopedEventLoop loop(&m_eventLoop); - m_aggregator = FOLKS_INDIVIDUAL_AGGREGATOR_DUP(); m_individualsChangedDetailedId = g_signal_connect(m_aggregator, "individuals-changed-detailed", @@ -171,7 +149,6 @@ (GAsyncReadyCallback) DummyBackendProxy::individualAggregatorPrepared, this); - loop.exec(); } QString DummyBackendProxy::createContact(const QtContacts::QContact &qcontact) @@ -237,6 +214,7 @@ folks_dummy_backend_register_persona_stores(m_backend, GEE_SET(personaStores), true); folks_dummy_persona_store_reach_quiescence(m_primaryPersonaStore); g_object_unref(personaStores); + prepareAggregator(); } void DummyBackendProxy::backendEnabled(FolksBackendStore *backendStore, @@ -257,8 +235,9 @@ folks_backend_store_load_backends_finish(backendStore, res, &error); checkError(error); - self->m_eventLoop->quit(); - self->m_eventLoop = 0; + self->m_backend = FOLKS_DUMMY_BACKEND(folks_backend_store_dup_backend_by_name(self->m_backendStore, "dummy")); + Q_ASSERT(self->m_backend != 0); + self->configurePrimaryStore(); } void DummyBackendProxy::checkError(GError *error) @@ -270,28 +249,31 @@ Q_ASSERT(error == 0); } -void DummyBackendProxy::mkpath(const QString &path) +void DummyBackendProxy::mkpath(const QString &path) const { QDir dir; + if (!dir.mkpath(path)) { + qWarning() << "Fail to create path" << path; + } Q_ASSERT(dir.mkpath(path)); } void DummyBackendProxy::initEnviroment() { Q_ASSERT(m_tmpDir.isValid()); - QString tmpFullPath = QString("%1/folks-test").arg(m_tmpDir.path()); + QString tmpFullPath = QString("%1").arg(m_tmpDir.path()); qputenv("FOLKS_BACKENDS_ALLOWED", "dummy"); qputenv("FOLKS_PRIMARY_STORE", "dummy"); + mkpath(tmpFullPath); qDebug() << "setting up in transient directory:" << tmpFullPath; // home qputenv("HOME", tmpFullPath.toUtf8().data()); - // cache - QString cacheDir = QString("%1/.cache").arg(tmpFullPath); - + // cache + QString cacheDir = QString("%1/.cache/").arg(tmpFullPath); mkpath(cacheDir); qputenv("XDG_CACHE_HOME", cacheDir.toUtf8().data()); @@ -307,7 +289,7 @@ mkpath(QString("%1/folks").arg(dataDir)); // runtime - QString runtimeDir = QString("%1/XDG_RUNTIME_DIR").arg(tmpFullPath); + QString runtimeDir = QString("%1/run").arg(tmpFullPath); mkpath(runtimeDir); qputenv("XDG_RUNTIME_DIR", runtimeDir.toUtf8().data()); @@ -351,9 +333,12 @@ folks_individual_aggregator_prepare_finish(fia, res, &error); checkError(error); + if (self->m_useDBus) { + self->registerObject(); + } - self->m_eventLoop->quit(); - self->m_eventLoop = 0; + self->m_isReady = true; + Q_EMIT self->ready(); } void DummyBackendProxy::individualAggregatorAddedPersona(FolksIndividualAggregator *fia, diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/dummy-backend.h address-book-service-0.1.1+14.04.20140318.2/tests/unittest/dummy-backend.h --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/dummy-backend.h 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/dummy-backend.h 2014-03-18 17:32:59.000000000 +0000 @@ -74,13 +74,14 @@ int m_individualsChangedDetailedId; QHash m_contacts; bool m_contactUpdated; + bool m_useDBus; bool registerObject(); void initFolks(); void configurePrimaryStore(); void initEnviroment(); void prepareAggregator(); - static void mkpath(const QString &path); + void mkpath(const QString &path) const; static void checkError(GError *error); static void backendEnabled(FolksBackendStore *backendStore, GAsyncResult *res, diff -Nru address-book-service-0.1.1+14.04.20140317.1/tests/unittest/service-life-cycle-test.cpp address-book-service-0.1.1+14.04.20140318.2/tests/unittest/service-life-cycle-test.cpp --- address-book-service-0.1.1+14.04.20140317.1/tests/unittest/service-life-cycle-test.cpp 2014-03-17 16:33:43.000000000 +0000 +++ address-book-service-0.1.1+14.04.20140318.2/tests/unittest/service-life-cycle-test.cpp 2014-03-18 17:32:59.000000000 +0000 @@ -31,8 +31,8 @@ void testServiceReady() { - QCOMPARE(m_serverIface->property("isReady").toBool(), true); - QCOMPARE(m_dummyIface->property("isReady").toBool(), true); + QTRY_COMPARE(m_serverIface->property("isReady").toBool(), true); + QTRY_COMPARE(m_dummyIface->property("isReady").toBool(), true); } void testCallServiceFunction() @@ -44,6 +44,7 @@ QCOMPARE(result.value(), true); } + void testServiceShutdown() { m_dummyIface->call("quit");