D24439: Fix test kfileplacesmodeltest after D7446

2019-10-07 Thread Méven Car
meven added a comment.


  Fixed as of 
https://build.kde.org/job/Frameworks/view/Platform%20-%20SUSEQt5.12/job/kio/job/kf5-qt5%20SUSEQt5.12/250/

REPOSITORY
  R241 KIO

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

To: meven, dfaure, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24439: Fix test kfileplacesmodeltest after D7446

2019-10-06 Thread Méven Car
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:6d8bd6f99a1c: Fix test kfileplacesmodeltest after D7446 
(authored by meven).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24439?vs=67369=67384

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: meven, dfaure, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24439: Fix test kfileplacesmodeltest after D7446

2019-10-06 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: meven, dfaure, ngraham
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24439: Fix test kfileplacesmodeltest after D7446

2019-10-06 Thread Méven Car
meven edited the summary of this revision.

REPOSITORY
  R241 KIO

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

To: meven, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D24439: Fix test kfileplacesmodeltest after D7446

2019-10-06 Thread Méven Car
meven created this revision.
meven added a reviewer: dfaure.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
meven requested review of this revision.

REVISION SUMMARY
  See D7556 

REPOSITORY
  R241 KIO

BRANCH
  master

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: meven, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-23 Thread Phabricator
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:2c478f4e429b: Fix unit test for kfileplacesmodeltest 
(authored by Renato Araujo Oliveira Filho renato.ara...@kdab.com).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34666=34700

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo, ngraham
Cc: bruns, ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, 
michaelh


D13018: Fix unit test for kfileplacesmodeltest

2018-05-23 Thread Renato Oliveira Filho
renatoo added a comment.


  In D13018#266694 , @bruns wrote:
  
  > Shouldn't this be handled by:
  >  http://doc.qt.io/qt-5/qstandardpaths.html#setTestModeEnabled
  
  
  this is different "setTestModeEnabled" sets the XDG_* dirs but the KIO tests 
expects an empty home dir without subfolders like Downloads, Documents, etc..

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

To: renatoo, ngraham
Cc: bruns, ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, 
michaelh


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Stefan Brüns
bruns added a comment.


  Shouldn't this be handled by:
  http://doc.qt.io/qt-5/qstandardpaths.html#setTestModeEnabled

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

To: renatoo, ngraham
Cc: bruns, ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, 
michaelh


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Much better, thanks for indulging me. :)
  
  Now onto `kfileplacesviewtest`...

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo added a comment.


  In D13018#266626 , @ngraham wrote:
  
  > I know you didn't change that, but it might be a nice enhancement (hint 
hint). :)
  
  
  
  
  In D13018#266626 , @ngraham wrote:
  
  > I know you didn't change that, but it might be a nice enhancement (hint 
hint). :)
  
  
  as you wish ;)

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo updated this revision to Diff 34666.
renatoo added a comment.


  Run tests in an empty home dir

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34646=34666

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Nathaniel Graham
ngraham added a comment.


  I know you didn't change that, but it might be a nice enhancement (hint 
hint). :)

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo added a comment.


  In D13018#266623 , @ngraham wrote:
  
  > Shouldn't that be a part of the test itself? I don't think it's reasonable 
to require that testers and testing platforms manually run that every time.
  
  
  I am not sure, this is how this test works, I never changed that.  Maybe ask 
the maintainers guys.

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Nathaniel Graham
ngraham added a comment.


  Shouldn't that be a part of the test itself? I don't think it's reasonable to 
require that testers and testing platforms manually run that every time.

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo added a comment.


  as maximilianocuria said, before run the tests you need to create a temporary 
home path:
  
  HOMETMP=$(mktemp -d)
  trap 'rm -rf $HOMETMP' EXIT
  export HOME="$HOMETMP"

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

To: renatoo, ngraham
Cc: ngraham, maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Nathaniel Graham
ngraham requested changes to this revision.
ngraham added a comment.
This revision now requires changes to proceed.


  `kiofilewidgets-kfileplacesmodeltest` still fails for me with this patch:
  
grep 'FAIL!  : KFilePlacesModelTest' -A 3 Testing/Temporary/LastTest.log 
FAIL!  : KFilePlacesModelTest::testInitialState() Compared values are not 
the same
   Actual   (m_places->rowCount()): 6
   Expected (4)   : 4
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(200)]
--
FAIL!  : KFilePlacesModelTest::testInitialList() Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 6
   Expected (urls) size: 9
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(236)]
--
FAIL!  : KFilePlacesModelTest::testReparse() Compared lists have different 
sizes.
   Actual   (placesUrls()) size: 7
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(252)]
--
FAIL!  : KFilePlacesModelTest::testMove() Compared lists have different 
sizes.
   Actual   (placesUrls()) size: 7
   Expected (urls) size: 9
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(396)]
--
FAIL!  : KFilePlacesModelTest::testPlacesLifecycle() Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 8
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(552)]
--
FAIL!  : KFilePlacesModelTest::testDevicePlugging() Compared lists differ 
at index 1.
   Actual   (placesUrls()): "/home/dev/Downloads"
   Expected (urls): "/"
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(665)]
--
FAIL!  : KFilePlacesModelTest::testDragAndDrop() Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 8
   Expected (urls) size: 9
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(472)]
FAIL!  : KFilePlacesModelTest::testDeviceSetupTeardown() Compared values 
are not the same
   Actual   (spy_changed.count()): 0
   Expected (1)  : 1
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(786)]
--
FAIL!  : KFilePlacesModelTest::testRemoteUrls(Ftp) Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 9
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(853)]
--
FAIL!  : KFilePlacesModelTest::testRemoteUrls(Samba) Compared lists differ 
at index 2.
   Actual   (placesUrls()): "/home/dev/Downloads"
   Expected (urls): "trash:/"
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(853)]
--
FAIL!  : KFilePlacesModelTest::testRemoteUrls(Sftp) Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 11
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(853)]
--
FAIL!  : KFilePlacesModelTest::testRemoteUrls(Fish) Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 12
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(853)]
--
FAIL!  : KFilePlacesModelTest::testRemoteUrls(Webdav) Compared lists have 
different sizes.
   Actual   (placesUrls()) size: 13
   Expected (urls) size: 10
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(853)]
--
FAIL!  : KFilePlacesModelTest::testIconRole(Places - Trash) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(999)]
FAIL!  : KFilePlacesModelTest::testIconRole(Remote - Network) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(999)]
FAIL!  : KFilePlacesModelTest::testIconRole(Devices - Nfs) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(999)]
FAIL!  : KFilePlacesModelTest::testIconRole(Devices - foreign) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(999)]
FAIL!  : KFilePlacesModelTest::testIconRole(Devices - Floppy) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.cpp(999)]
FAIL!  : KFilePlacesModelTest::testIconRole(Devices - cdrom) 
'index.data(KFilePlacesModel::IconNameRole).toString().startsWith(expectedIconName)'
 returned FALSE. ()
   Loc: [/home/dev/repos/kio/autotests/kfileplacesmodeltest.

D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo added a comment.


  ok it should work now.

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

To: renatoo
Cc: maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo updated this revision to Diff 34646.
renatoo added a comment.


  Fixed code style

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34645=34646

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo
Cc: maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo updated this revision to Diff 34645.
renatoo added a comment.


  Fixed all tests

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34644=34645

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo
Cc: maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Renato Oliveira Filho
renatoo updated this revision to Diff 34644.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34581=34644

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo
Cc: maximilianocuria, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, 
bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-22 Thread Maximiliano Curia
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 ...***Failed0.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


D13018: Fix unit test for kfileplacesmodeltest

2018-05-21 Thread Elvis Angelaccio
elvisangelaccio added a comment.


  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 ...***Failed0.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)]

REPOSITORY
  R241 KIO

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

To: renatoo
Cc: elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-21 Thread Renato Oliveira Filho
renatoo updated this revision to Diff 34581.
renatoo added a comment.


  Add missing url

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13018?vs=34580=34581

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13018: Fix unit test for kfileplacesmodeltest

2018-05-21 Thread Renato Oliveira Filho
renatoo created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
renatoo requested review of this revision.

TEST PLAN
  Run "kiofilewidgets-kfileplacesmodeltest" make sure that "testRemoteUrls" is 
passing

REPOSITORY
  R241 KIO

BRANCH
  master

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: renatoo
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-12-02 Thread David Faure
dfaure added inline comments.

INLINE COMMENTS

> kfileplacesmodeltest.cpp:966
>  QTest::newRow("Places - Trash") << m_places->index(2, 0)
> -   << QStringLiteral("user-trash-full");
> +   << QStringLiteral("user-trash");
>  QTest::newRow("Remote - Network") << m_places->index(3, 0)

Why this change?
It created a regression in the CI.
Please debug fully. If this depends on your real-user's trash being full or 
not, then something's broken ;)  QStandardPaths' test mode should make it look 
in a different config dir than ~/.config (where trashrc stores this 
information).

http://ci-logs.kde.flaska.net/0b/0bc40d7c8b71af2c3861f5b39a4ebee91b046371/rebuilddep/rebuilddep-kf5-qt57-clang-el7/27e1666/shell_output.log

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: dfaure, anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:3e537c4dd935: Factoring out lists of url data within 
KFilePlacesModelTest (authored by franckarrecot, committed by ngraham).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=23023=23027

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D9017: Avoid run kfileplacesmodeltest and kfileplacesviewtest in parallel

2017-11-27 Thread Renato Oliveira Filho
renatoo created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Both tests modify the bookmark file and that can cause test failure

TEST PLAN
  run all kio unit test

REPOSITORY
  R241 KIO

BRANCH
  serialize-unit-test

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

AFFECTED FILES
  autotests/CMakeLists.txt

To: renatoo
Cc: #frameworks


D9017: Avoid run kfileplacesmodeltest and kfileplacesviewtest in parallel

2017-11-27 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R241 KIO

BRANCH
  serialize-unit-test

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

To: renatoo, dfaure
Cc: #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Franck Arrecot
franckarrecot updated this revision to Diff 23023.
franckarrecot added a comment.


  update

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=22900=23023

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Franck Arrecot
franckarrecot added a comment.


  this one is landable now that its dependencies are pushed.

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D9017: Avoid run kfileplacesmodeltest and kfileplacesviewtest in parallel

2017-11-27 Thread Phabricator
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:700c7d3af43b: Avoid run kfileplacesmodeltest and 
kfileplacesviewtest in parallel (authored by Renato Araujo Oliveira Filho 
renato.ara...@kdab.com).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D9017?vs=23021=23022

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

AFFECTED FILES
  autotests/CMakeLists.txt

To: renatoo, dfaure
Cc: #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Franck Arrecot
franckarrecot added a comment.


  I'll ship it as soon as the commits it's built on will be shipped. Sorry I 
rebased this one to renato new commit split so we would avoid conflict if 
interlaced commit pushed happend.

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Franck Arrecot
franckarrecot edited the summary of this revision.
franckarrecot added a dependency: D8948: Created an auxiliary function 
'KFilePlacesModel::movePlace'.

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-27 Thread Anthony Fieroni
anthonyfieroni added a comment.


  Ship it, it's only tests and looks good.

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: anthonyfieroni, ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-25 Thread Nathaniel Graham
ngraham added a comment.


  Is this ready to go in, or do we need some more time for review?

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-24 Thread Franck Arrecot
franckarrecot updated this revision to Diff 22900.
franckarrecot added a comment.


  rebased over in review renato 's patches

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=21750=22900

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: franckarrecot, renatoo, ervin, mlaurent
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-24 Thread Franck Arrecot
franckarrecot commandeered this revision.
franckarrecot edited reviewers, added: mlaurent; removed: franckarrecot.

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

To: franckarrecot, renatoo, ervin, mlaurent
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-02 Thread Renato Oliveira Filho
renatoo added a comment.


  In https://phabricator.kde.org/D8366#163427, @ngraham wrote:
  
  > Is this dependent on any of the other patches floating around?
  
  
  Probably not, but that will affect (possible conflicts) with all patches

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

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-02 Thread Nathaniel Graham
ngraham added a comment.


  Is this dependent on any of the other patches floating around?

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

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-02 Thread Renato Oliveira Filho
renatoo accepted this revision.

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

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-02 Thread Kevin Ottens
ervin accepted this revision.
This revision is now accepted and ready to land.

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

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-11-02 Thread Laurent Montel
mlaurent updated this revision to Diff 21750.
mlaurent added a comment.


  Rebase it

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=21646=21750

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-31 Thread Laurent Montel
mlaurent updated this revision to Diff 21646.
mlaurent added a comment.


  Fix typo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=21289=21646

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-31 Thread Laurent Montel
mlaurent commandeered this revision.
mlaurent edited reviewers, added: franckarrecot; removed: mlaurent.
mlaurent added a comment.


  impossible to rebase this one...
  I will need to rewrite all this patch

REPOSITORY
  R241 KIO

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

To: mlaurent, renatoo, ervin, franckarrecot
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-31 Thread Kevin Ottens
ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> kfileplacesmodeltest.cpp:177
>  
> +static const QStringList initalListOfPlaces()
> +{

Typo: initial

> kfileplacesmodeltest.cpp:182
> +
> +static const QStringList initalListOfDevices()
> +{

ditto

> kfileplacesmodeltest.cpp:187
> +
> +static const QStringList initalListOfRemovableDevices()
> +{

ditto

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, mlaurent, ervin
Cc: ervin, ngraham, mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-30 Thread Laurent Montel
mlaurent added a dependent revision: D8367: Hidding place groups implementation 
in KFilePlacesModel.

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, mlaurent
Cc: mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-25 Thread Franck Arrecot
franckarrecot updated this revision to Diff 21289.
franckarrecot added a comment.


  switch removable after regular devices

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D8366?vs=20973=21289

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: franckarrecot, renatoo, mlaurent
Cc: mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-25 Thread Laurent Montel
mlaurent accepted this revision.
mlaurent added a comment.
This revision is now accepted and ready to land.


  seems ok for me

REPOSITORY
  R241 KIO

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

To: franckarrecot, renatoo, mlaurent
Cc: mlaurent, #frameworks


D8366: Factoring out lists of url data within KFilePlacesModelTest

2017-10-19 Thread Franck Arrecot
franckarrecot created this revision.
franckarrecot added a reviewer: renatoo.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Instead of reusing the same string lists all over the place
  we factor them out, easier to read and maintain.

TEST PLAN
  It's within a test

REPOSITORY
  R241 KIO

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

AFFECTED FILES
  autotests/kfileplacesmodeltest.cpp

To: franckarrecot, renatoo
Cc: #frameworks


Re: KFilePlacesModelTest

2016-05-11 Thread David Faure
On Saturday 07 May 2016 19:50:36 Michael Pyne wrote:
> On Sat, May 7, 2016 14:33:53 David Faure wrote:
> > The thing I wonder is... does it really make sense to have a model with
> > random ordering? Isn't it a problem for users if their visible list of
> > places is different between every run? Or am I missing something and the
> > different order in the test isn't actually user visible?
> 
> Is it trying to test that the entries are present in a *specific* order, or 
> simply that the entries will be maintained in a constant order between 
> serialization/deserialization? If it's the latter then we could instead use 
> whatever the existing order is in one call as the expected order for the 
> second call.
> 
> Also, if we're just trying to show that a specific set of entries would be 
> present, couldn't we sort the expected and the actual lists before doing the 
> comparison, to make it independent of order? In other words we could break 
> the 
> test into two: 1) ensure order is properly saved and loaded, and 2) ensure 
> right items are present independent of their order.

For the record, this is now fixed in solid and kio.
The random ordering came from QList->QSet->QList, which I managed
to simplify to avoid the QSet step.

Giuseppe: it wasn't about two sets, but about a single intermediary qset,
and then checking the final QList with a fixed "expected" list. Since everything
is fixed upfront (the initial QList comes from parsing a test file), it looked
like this could be made reliable - but somehow on two different machines
with the exact same code (AFAICS), I was getting a different order.
Oh well, doesn't matter anymore :-)

Thanks for the input everyone.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KFilePlacesModelTest

2016-05-08 Thread Giuseppe D'Angelo

Il 07/05/2016 20:05, David Faure ha scritto:

We disable seed randomisation and sse4.2 (can't remember why that mattered,
that was something Volker found out iirc), and that made it pass until recently,
I'm not sure what changed.


Isn't that inherently dangerous though?

Even with those disabled, iteration in a hash / set depends on the 
"history" of that set:



#include 

int main()
{
qputenv("QT_HASH_SEED", "0");
qputenv("QT_NO_CPU_FEATURE", "sse4.2");

QSet set1, set2;

// add 0-999, remove 10-999
for (int i = 0; i < 1000; ++i)
set1.insert(QString::number(i));

for (int i = 10; i < 1000; ++i)
set1.remove(QString::number(i));

// just add 0-9
for (int i = 0; i < 10; ++i)
set2.insert(QString::number(i));

qDebug() << (set1 == set2); // true
qDebug() << (set1.toList() == set2.toList()); // unpredictable, likely false
}



Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KFilePlacesModelTest

2016-05-08 Thread Giuseppe D'Angelo

Il 07/05/2016 14:33, David Faure ha scritto:

The thing I wonder is... does it really make sense to have a model with random 
ordering?
Isn't it a problem for users if their visible list of places is different 
between every run?
Or am I missing something and the different order in the test isn't actually 
user visible?


I'm missing knowledge of the relevant code here. Is the code somehow 
building two QSets and then comparing their keys, and expecting a stable 
result of some sorts? This would be quite dangerous and impossible to 
control even if you disable seed randomisation and fix the hashing 
algorithm...


Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KFilePlacesModelTest

2016-05-07 Thread Michael Pyne
On Sat, May 7, 2016 14:33:53 David Faure wrote:
> The thing I wonder is... does it really make sense to have a model with
> random ordering? Isn't it a problem for users if their visible list of
> places is different between every run? Or am I missing something and the
> different order in the test isn't actually user visible?

Is it trying to test that the entries are present in a *specific* order, or 
simply that the entries will be maintained in a constant order between 
serialization/deserialization? If it's the latter then we could instead use 
whatever the existing order is in one call as the expected order for the 
second call.

Also, if we're just trying to show that a specific set of entries would be 
present, couldn't we sort the expected and the actual lists before doing the 
comparison, to make it independent of order? In other words we could break the 
test into two: 1) ensure order is properly saved and loaded, and 2) ensure 
right items are present independent of their order.

Regards,
 - Michael Pyne
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KFilePlacesModelTest

2016-05-07 Thread Kevin Ottens
Hello,

Not sure I can be of any help anymore in that area, I've been way to remote 
from that code for years now. That said there's a couple of questions at the 
end I might be able to answer:

On Saturday, 7 May 2016 14:33:53 CEST David Faure wrote:
> The thing I wonder is... does it really make sense to have a model with
> random ordering? Isn't it a problem for users if their visible list of
> places is different between every run? Or am I missing something and the
> different order in the test isn't actually user visible?

Indeed it was not supposed to be user visible. The places in the list come 
from entries added by the user and devices reported by solid. Whatever the 
model saw in the past ends up in the bookmark file, which freezes the order, 
next time it shows up it'll have the same place again in the list. But if you 
got a bunch of new devices appearing, they're added at the end of the list in 
no particular order.

That was the core of the wanted behavior. Of course it could have been broken 
somewhere along the way, I passed the maintenance of that part years ago. 
Also, IIRC most of the tests aren't really clear on what's saved in the 
bookmark file or not, so some of the stuff is ordered some not really.

Hope that helps at least a bit.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com



signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: KFilePlacesModelTest

2016-05-07 Thread David Faure
On Saturday 07 May 2016 19:03:17 Giuseppe D'Angelo wrote:
> Il 07/05/2016 14:33, David Faure ha scritto:
> > The thing I wonder is... does it really make sense to have a model with 
> > random ordering?
> > Isn't it a problem for users if their visible list of places is different 
> > between every run?
> > Or am I missing something and the different order in the test isn't 
> > actually user visible?
> 
> I'm missing knowledge of the relevant code here. Is the code somehow 
> building two QSets and then comparing their keys, and expecting a stable 
> result of some sorts? This would be quite dangerous and impossible to 
> control even if you disable seed randomisation and fix the hashing 
> algorithm...

One QSet (within a subsystem called Solid), then iterating through it to return
a list to the upper layer (KIO), which uses that to create an itemmodel, and 
then
in the unittest, iterating over the itemmodel and comparing with a fixed
expected list. Which is why order matters for the unittest.

We disable seed randomisation and sse4.2 (can't remember why that mattered,
that was something Volker found out iirc), and that made it pass until recently,
I'm not sure what changed.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5


signature.asc
Description: This is a digitally signed message part.
___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Change in kio[master]: Update kfileplacesmodeltest to read the correct file, after ...

2015-07-29 Thread David Faure (Code Review)
David Faure has uploaded a new change for review.

  https://gerrit.vesnicky.cesnet.cz/r/485

Change subject: Update kfileplacesmodeltest to read the correct file, after 
e919daeb5
..

Update kfileplacesmodeltest to read the correct file, after e919daeb5

Change-Id: I4c60e7cda727a94e77f04eca5cfa6f975b4ff3ca
CCMAIL: emmanuelpescosta...@gmail.com
---
M autotests/kfileplacesmodeltest.cpp
1 file changed, 12 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/85/485/1

diff --git a/autotests/kfileplacesmodeltest.cpp 
b/autotests/kfileplacesmodeltest.cpp
index 33de34a..4d2c5b5 100644
--- a/autotests/kfileplacesmodeltest.cpp
+++ b/autotests/kfileplacesmodeltest.cpp
@@ -39,7 +39,7 @@
 #endif
 
 QT_BEGIN_NAMESPACE
-// Avoid QHash randomization so that the order of the devicees is stable
+// Avoid QHash randomization so that the order of the devices is stable
 extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed; // from qhash.cpp
 QT_END_NAMESPACE
 
@@ -75,20 +75,20 @@
 QMapQString, QDBusInterface * m_interfacesMap;
 };
 
+static QString bookmarksFile()
+{
+return 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
/user-places.xbel;
+}
+
 void KFilePlacesModelTest::initTestCase()
 {
 // Make sure we always use 0 as seed
 qt_qhash_seed.fetchAndStoreRelaxed(0);
 
 // Ensure we'll have a clean bookmark file to start
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
/kfileplaces/bookmarks.xml;
+const QString file = bookmarksFile();
 QFile f(file);
 f.remove();
-
-// Erase the shared bookmarks file also
-const QString sharedBookmarksFile = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
/user-places.xbel;
-QFile f2(sharedBookmarksFile);
-f2.remove();
 
 qRegisterMetaTypeQModelIndex();
 const QString fakeHw = QFINDTESTDATA(fakecomputer.xml);
@@ -187,8 +187,7 @@
 
 // reparse the bookmark file
 
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QLatin1Char('/') + kfileplaces/bookmarks.xml;
-KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, 
kfilePlaces);
+KBookmarkManager *bookmarkManager = 
KBookmarkManager::managerForFile(bookmarksFile(), kfilePlaces);
 
 bookmarkManager-notifyCompleteChange(QString());
 
@@ -210,8 +209,7 @@
 
 void KFilePlacesModelTest::testInternalBookmarksHaveIds()
 {
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QLatin1Char('/') + kfileplaces/bookmarks.xml;
-KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, 
kfilePlaces);
+KBookmarkManager *bookmarkManager = 
KBookmarkManager::managerForFile(bookmarksFile(), kfilePlaces);
 KBookmarkGroup root = bookmarkManager-root();
 
 // Verify every entry has an id or an udi
@@ -314,8 +312,7 @@
 QSignalSpy spy_inserted(m_places, 
SIGNAL(rowsInserted(QModelIndex,int,int)));
 QSignalSpy spy_removed(m_places, SIGNAL(rowsRemoved(QModelIndex,int,int)));
 
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QLatin1Char('/') + kfileplaces/bookmarks.xml;
-KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, 
kfilePlaces);
+KBookmarkManager *bookmarkManager = 
KBookmarkManager::managerForFile(bookmarksFile(), kfilePlaces);
 KBookmarkGroup root = bookmarkManager-root();
 KBookmark trash = m_places-bookmarkForIndex(m_places-index(3, 0));
 KBookmark before_trash = m_places-bookmarkForIndex(m_places-index(2, 0));
@@ -485,8 +482,7 @@
 QCOMPARE(args.at(2).toInt(), 9);
 QCOMPARE(spy_removed.count(), 0);
 
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QLatin1Char('/') + kfileplaces/bookmarks.xml;
-KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, 
kfilePlaces);
+KBookmarkManager *bookmarkManager = 
KBookmarkManager::managerForFile(bookmarksFile(), kfilePlaces);
 KBookmarkGroup root = bookmarkManager-root();
 KBookmark before_trash = m_places-bookmarkForIndex(m_places-index(2, 0));
 KBookmark foo = m_places-bookmarkForIndex(m_places-index(9, 0));
@@ -602,8 +598,7 @@
 
 // Move the device in the list, and check that it memorizes the position 
across plug/unplug
 
-const QString file = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QLatin1Char('/') + kfileplaces/bookmarks.xml;
-KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, 
kfilePlaces);
+KBookmarkManager *bookmarkManager = 
KBookmarkManager::managerForFile(bookmarksFile(), kfilePlaces);
 KBookmarkGroup root = bookmarkManager-root();
 KBookmark before_trash = m_places-bookmarkForIndex(m_places-index(2, 0

KFilePlacesModelTest

2015-07-04 Thread David Faure
CI says:

10:59:57 QDEBUG : KFilePlacesModelTest::testReparse() Expected: 
(/home/jenkins, remote:/, /, trash:/, /media/nfs, /foreign, 
/media/XO-Y4, /media/floppy0, /media/cdrom, /foo)
10:59:57 QDEBUG : KFilePlacesModelTest::testReparse() Got: (/home/jenkins, 
remote:/, /, trash:/, /media/floppy0, /media/cdrom, /media/nfs, 
/media/XO-Y4, /foreign, /foo)
10:59:57 FAIL!  : KFilePlacesModelTest::testReparse() Compared lists differ at 
index 4.
10:59:57Actual   (placesUrls()): /media/floppy0
10:59:57Expected (urls): /media/nfs
10:59:57Loc: 
[/home/jenkins/builds/kio/kf5-qt5/autotests/kfileplacesmodeltest.cpp(186)]

Anyone knows how the ordering is supposed to work in that unittest?

I see that Kévin's commit 25941ce2633d7ec710142c4c5f26e93369a09786 was already 
about ordering...
but I think the new CI machine is what triggered the above failure.

Locally this test method passes, but the test fails further on, also about 
ordering:

QDEBUG : KFilePlacesModelTest::testMove() kfileplacesmodeltest(12131)/default 
KFilePlacesModelTest::testMove: Expected: (/home/dfaure, remote:/, /, 
/media/nfs, /foreign, /media/XO-Y4, /media/floppy0, /media/cdrom, 
trash:/)
QDEBUG : KFilePlacesModelTest::testMove() kfileplacesmodeltest(12131)/default 
KFilePlacesModelTest::testMove: Got: (/home/dfaure, remote:/, /, 
trash:/, /media/nfs, /foreign, /media/XO-Y4, /media/floppy0, 
/media/cdrom)
FAIL!  : KFilePlacesModelTest::testMove() Compared lists differ at index 3.
   Actual   (placesUrls()): trash:/
   Expected (urls): /media/nfs
   Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesmodeltest.cpp(335)]

testPlacesLifecycle() fails because trash:/ is missing, not just an ordering 
problem.

(Emmanuel: there's also a failure related to bookmarks, could be related to 
commit e919daeb)



-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel