D13018: Fix unit test for kfileplacesmodeltest

Maximiliano Curia noreply at phabricator.kde.org
Tue May 22 08:52:28 UTC 2018


maximilianocuria added a comment.


  In D13018#266137 <https://phabricator.kde.org/D13018#266137>, @elvisangelaccio wrote:
  
  > Hmm, still seems to fail here:
  >
  >   $ ctest -R kfileplacesmodeltest
  >   Test project /home/elvis/dev/kde/kio/local-build
  >       Start 50: kiofilewidgets-kfileplacesmodeltest
  >   1/1 Test #50: kiofilewidgets-kfileplacesmodeltest ...***Failed    0.60 sec
  >   ********* Start testing of KFilePlacesModelTest *********
  >   Config: Using QtTest library 5.11.0, Qt 5.11.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.1.0)
  >   QDEBUG : KFilePlacesModelTest::initTestCase() void Solid::Backends::Fake::FakeManager::parseMachineFile() Parsing fake computer XML:  "/home/elvis/dev/kde/kio/autotests/fakecomputer.xml" 
  >  
  >   PASS   : KFilePlacesModelTest::initTestCase()
  >   FAIL!  : KFilePlacesModelTest::testInitialState() Compared values are not the same
  >      Actual   (m_places->rowCount()): 6
  >      Expected (4)                   : 4
  >      Loc: [../autotests/kfileplacesmodeltest.cpp(200)]
  >   QDEBUG : KFilePlacesModelTest::testInitialList() Expected: ("/home/elvis", "/", "trash:/", "remote:/", "/media/nfs", "/foreign", "/media/floppy0", "/media/XO-Y4", "/media/cdrom")
  >   QDEBUG : KFilePlacesModelTest::testInitialList() Got: ("/home/elvis", "/home/elvis/Desktop", "/home/elvis/Downloads", "/", "trash:/", "remote:/")
  >   FAIL!  : KFilePlacesModelTest::testInitialList() Compared lists have different sizes.
  >      Actual   (placesUrls()) size: 6
  >      Expected (urls) size: 9
  >      Loc: [../autotests/kfileplacesmodeltest.cpp(236)]
  >
  
  
  That's a different test (from the same file). That part of the test assumes that you have a clean home directory. I run this tests with a wrapper, something like:
  
  HOMETMP=$(mktemp -d)
  trap 'rm -rf $HOMETMP' EXIT
  export HOME="$HOMETMP"
  
  xvfb-run -a dbus-run-session -- obj-x86_64-linux-gnu/bin/kfileplacesmodeltest
  
  The complete version can be seen here:
   https://salsa.debian.org/qt-kde-team/kde/kio/tree/master/debian/tests
  
  That's after applying the patches:
   https://salsa.debian.org/qt-kde-team/kde/kio/tree/master/debian/patches
  
  The Debian test results can be seen here:
   https://ci.debian.net/data/autopkgtest/unstable/amd64/k/kio/342727/log.gz
  
  There is an error in a different part of this test, it seems that kio strips the -full part of the trash icon name but not always. (see src/filewidgets/kfileplacesitem.cpp : 418)

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D13018

To: renatoo
Cc: maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180522/f784ffbe/attachment.html>


More information about the Kde-frameworks-devel mailing list