Fwd: Unittests: kcalendartest.cpp

David Faure faure+bluesystems at kde.org
Sat Dec 15 00:32:55 UTC 2012


> Note that  ktoolbar_unittest and khtmlparttest passes for me.

khtmlparttest was as I suspected, fixed by a clean build.
ktoolbar_unittest should fail with Qt5, and work with Qt4...
unless maybe there was a very recent fix in Qt5 which I don't have.
I'll investigate that another day.

> Taking a further look on the remaining failures you don't have show that:
> 
>          11 - kdecore-kdatetimetest (Failed)
>          18 - kdecore-ktcpsockettest (Failed)
>         104 - kcookiejartest (Failed)
> These tests seems related to locale, as they pass if I export LANG=C, not
> sure if we need to do anything about that, or just document that some tests
> are only expected to pass with LANG=C.

Ah, very interesting. This was done by qtest_kde.h, and got lost with the port 
away from that. Please add something like this to these tests:

void setLangVar()
{
    qputenv("LANG", "C");
}
Q_CONSTRUCTOR_FUNCTION(setLangVar)

Or maybe the equivalent in QLocale/KLocale calls, to rely less on env vars 
(e.g. so that the tests work on Windows too)

PS: I doubt ktcpsockettest is related to LANG=C, sounds more like the usual 
intermittent networking issue with some websites.
 
>           4 - kdecore-kmountpointtest (Failed)
> This one seems to be because the LXC container doesn't contain the device
> file in /dev for the block device of any mounted file system, which cases
> KMountPoint::Private::finalizePossibleMountPoint to believe no mounts are
> from a "real device", at which point
> KMountPointTest::testCurrentMountPoints() get nothing to work on, and
> FAILs. Would also FAIL on a root-on-nfs setup. Should probably SKIP
> instead.

Ah, you use an LXC container, just like build.kde.org, I see.
I just committed a fix for this.

>           8 - kdecore-kshelltest (Failed)
> This one is because ${HOME} and the home directory in the passwd database is
> not the same (I'm setting HOME to keep my qt4 and qt5 test environments
> from polluting each other or my regular home directory). Not sure what to
> do about this one.

Huh, that's a pretty unusual setup. The recommended way is rather to set
XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_CACHE_HOME, and XDG_RUNTIME_DIR to 
different directories for different setups.

But anyway, I guess you could test for this special case in initTestCase and 
skip individual tests or adjust expected values in such a setup... It just 
seems very special case to maintain.

>          84 - kio-jobtest (Failed)
> This one is because btrfs reports 0 as directory file size (as a directory
> in brfs has no data, only metadata), which will cause the total size of the
> tested directory to be smaller than expected. I have submitted a "fix" for
> this issue (eg reduce the expected minimum total file size).

Thanks for that fix, backported.

> That only leaves three tests I have no clue about why they are failing.
>          82 - kio-krununittest (Failed)

This was "kdesu not found", I believe. I just committed a fix for that, after I 
saw it happen on build.kde.org too.

>          92 - kio-kdirlistertest (Failed)
>          99 - kmimeassociationstest (Failed)

Now that's VERY interesting.
build.kde.org has these two failures too, and I don't. So I'm starting to 
wonder if these are LXC related, too.... let's debug these later.

Thanks!

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by BlueSystems and KDAB to work on KDE Frameworks



More information about the Kde-frameworks-devel mailing list