DevHeads.net

Broken tests in kdelibs due to kio change

Dawit, kdelibs people, there are 4 tests that broke in very-close-to-release
4.11 branch with a change from yesterday to kio.

<a href="http://build.kde.org/view/KDE%20SC%20stable/job/kdelibs_stable/735/" title="http://build.kde.org/view/KDE%20SC%20stable/job/kdelibs_stable/735/">http://build.kde.org/view/KDE%20SC%20stable/job/kdelibs_stable/735/</a>

Can you guys please have a look and fix those failing tests?

Also please please please make sure you either run the tests before commiting
changes so late in the release cycle *and* even if you run them please check
with jenkins to see his opinion on your changes :)

Cheers,
Albert

Comments

Re: Broken tests in kdelibs due to kio change

By Dawit A at 08/03/2013 - 13:16

Hmm... I fail to see how my changes break those unit tests. Perhaps
changing fileundomanager from NoGui to Gui did it? Anyhow, I will try to
look into it.

Re: Broken tests in kdelibs due to kio change

By Dawit A at 08/03/2013 - 13:39

OK. I see why those tests failed and I fixed them not to anymore. Updating
the clibpboard in KIO introduced a dependency on QtGui.
Hence QTEST_KDEMAIN( KDirModelTest, NoGUI ) has to be changed
to QTEST_KDEMAIN( KDirModelTest, GUI ).

Hmm... I am curious if the dependency on QClipboard makes it difficult to
split this into core/gui in frameworks?

Re: Broken tests in kdelibs due to kio change

By Albert Astals Cid at 08/03/2013 - 13:52

El Dissabte, 3 d'agost de 2013, a les 13:39:40, Dawit A va escriure:
I am not a KIO specialist, is this new runtime dependency ok that late in the
release cycle?

Can anyone more in the know [than me] comment?

If it is, it seems some kde-runtime tests also have to be fixed.

<a href="http://build.kde.org/view/KDE%20SC%20stable/job/kde-runtime_stable/291/" title="http://build.kde.org/view/KDE%20SC%20stable/job/kde-runtime_stable/291/">http://build.kde.org/view/KDE%20SC%20stable/job/kde-runtime_stable/291/</a>

Cheers,
Albert

Re: Broken tests in kdelibs due to kio change

By Dawit A at 08/03/2013 - 17:14

Well I do not consider this to be a new dependency, runtime or otherwise
since KIO already has a dependency on QtGui in the current stable branches.
In frameworks that is going to be changed such that the core and ui
portions will be separated out into their own components. Anyhow, my
question was really limited to the effects this patch might have on the
work being done in frameworks only.

The breakage of the unit tests arise from the fact that these unit tests
were attempting not to create an instance of QApplication in their main
function because they did not test portion of KIO that relied on it. They
still link against QtGui however. Of course that changed with the use of
QClipboard in some of the KIO functions and hence broke the unit tests. I
will fix the kde-runtime tests as well.

Re: Broken tests in kdelibs due to kio change

By Albert Astals Cid at 08/04/2013 - 10:25

El Dissabte, 3 d'agost de 2013, a les 17:14:01, Dawit A va escriure:
The tests disagree with you, they were working, and then they were not, the
runtime moved below their feet.

Linking to QtGui does not necessarily mean you have a Widget around like your
new patches seem to need.

I don't care about frameworks, they'll be released quite in the future, so we
can fix them anytime if the patch is problematic for them.

I do however worry 4.11 that we are releaseing in 4 days to which you seem to
have introduced what seems a reasonably big change.

QTEST_KDEMAIN( KDirModelTest, NoGUI ) *does* create a QApplication, just says
it won't need a gui.

As said, do you know for sure that all the users of kio are creating a
qapplication with gui enabled? The fact that we have 7 tests that assumed
otherwise make me icky.

Albert

Re: Broken tests in kdelibs due to kio change

By Albert Astals Cid at 08/03/2013 - 13:54

El Dissabte, 3 d'agost de 2013, a les 19:52:28, Albert Astals Cid va escriure:
Also, how hard would it be to detect we are running guiless and not use
QClipboard? Is that possible at all?

Cheers,
Albert

Re: Broken tests in kdelibs due to kio change

By Milian Wolff at 08/03/2013 - 15:13

On Saturday 03 August 2013 19:54:45 Albert Astals Cid wrote:
Yes, it's doable. You still have to link against QtGui though. See

<a href="http://qt-project.org/doc/qt-4.8/qapplication.html#Type-enum" title="http://qt-project.org/doc/qt-4.8/qapplication.html#Type-enum">http://qt-project.org/doc/qt-4.8/qapplication.html#Type-enum</a>

and

<a href="http://qt-project.org/doc/qt-4.8/qapplication.html#type" title="http://qt-project.org/doc/qt-4.8/qapplication.html#type">http://qt-project.org/doc/qt-4.8/qapplication.html#type</a>

Bye