Review Request 121972: Make ksycocadicttest work when sycoca does not exist yet.

Alex Merry alex.merry at kde.org
Sun Jan 11 16:19:56 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121972/
-----------------------------------------------------------

(Updated Jan. 11, 2015, 4:19 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Repository: kservice


Description
-------

Using KServiceType::serviceType when the sycoca database does not yet
exist can lead to an assert in the KServiceTypeFactory constructor being
called, meaning we never get to the line where we rebuild sycoca.


Diffs
-----

  autotests/ksycocadicttest.cpp cec9eeb9b40d96b42321fe7f50b8a60b0f5b3492 

Diff: https://git.reviewboard.kde.org/r/121972/diff/


Testing
-------

rm -rf ~/.qttest; ./ksycocadicttest

Without this patch, this fails with:

    ********* Start testing of KSycocaDictTest *********
    Config: Using QtTest library 5.4.0, Qt 5.4.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.9.2)
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open ksycoca from "/home/kde-devel/.qttest/cache/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open global ksycoca from  "/home/kde-devel/.qttest/share/kservices5/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open ksycoca from "/home/kde-devel/.qttest/cache/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open global ksycoca from  "/home/kde-devel/.qttest/share/kservices5/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open ksycoca from "/home/kde-devel/.qttest/cache/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::openDatabase?[0m: Trying to open global ksycoca from  "/home/kde-devel/.qttest/share/kservices5/ksycoca5"
    QDEBUG : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(kf5.kservice.sycoca) ?[31m?[34mKSycocaPrivate::checkDatabase?[0m: Still no database...
    QFATAL : KSycocaDictTest::initTestCase() ksycocadicttest(3942)/(default) ?[31munknown?[0m: ASSERT failure in KServiceTypeFactory::KServiceTypeFactory(): "Could not open sycoca database, you must run kbuildsycoca first!", file /home/kde-devel/src/frameworks/kservice/src/services/kservicetypefactory.cpp, line 38
    FAIL!  : KSycocaDictTest::initTestCase() Received a fatal error.
       Loc: [Unknown file(0)]
    Totals: 0 passed, 1 failed, 0 skipped, 0 blacklisted
    ********* Finished testing of KSycocaDictTest *********

With the patch, it succeeds.


Thanks,

Alex Merry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150111/937717c5/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list