Bug 394850 - Test RunnerContextTest fails
Summary: Test RunnerContextTest fails
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-krunner
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.46.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-30 08:25 UTC by h.goebel
Modified: 2018-12-20 09:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description h.goebel 2018-05-30 08:25:24 UTC
When building krunner with QT 5.11, test RunnerContextTest fails:

********* Start testing of RunnerContextTest *********
Config: Using QtTest library 5.11.0, Qt 5.11.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.5.0)
PASS   : RunnerContextTest::initTestCase()
PASS   : RunnerContextTest::typeDetection(http without host)
PASS   : RunnerContextTest::typeDetection(http without host)
PASS   : RunnerContextTest::typeDetection(ftp with host)
FAIL!  : RunnerContextTest::typeDetection(file double slash) Compared values are not the same
   Actual   (int(m_context.type())): 8
   Expected (int(type))            : 2
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
FAIL!  : RunnerContextTest::typeDetection(file triple slash) Compared values are not the same
   Actual   (int(m_context.type())): 1
   Expected (int(type))            : 2
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
FAIL!  : RunnerContextTest::typeDetection(file single slash) Compared values are not the same
   Actual   (int(m_context.type())): 1
   Expected (int(type))            : 2
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
FAIL!  : RunnerContextTest::typeDetection(file multiple path) Compared values are not the same
   Actual   (int(m_context.type())): 1
   Expected (int(type))            : 2
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
FAIL!  : RunnerContextTest::typeDetection(invalid file path) Compared values are not the same
   Actual   (int(m_context.type())): 8
   Expected (int(type))            : 1
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
PASS   : RunnerContextTest::typeDetection(executable)
PASS   : RunnerContextTest::typeDetection(executable with params)
PASS   : RunnerContextTest::typeDetection(full path executable)
PASS   : RunnerContextTest::typeDetection(full path executable with params)
FAIL!  : RunnerContextTest::typeDetection(protocol-less path) Compared values are not the same
   Actual   (int(m_context.type())): 1
   Expected (int(type))            : 2
   Loc: [/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0/autotests/runnercontexttest.cpp(60)]
PASS   : RunnerContextTest::typeDetection(invalid protocol-less path)
PASS   : RunnerContextTest::typeDetection(calculation)
PASS   : RunnerContextTest::typeDetection(calculation (float))
PASS   : RunnerContextTest::cleanupTestCase()
Totals: 12 passed, 6 failed, 0 skipped, 0 blacklisted, 11ms
********* Finished testing of RunnerContextTest *********
Comment 1 h.goebel 2018-05-30 08:25:55 UTC
I verified that the respective paths exist. (Please note that I'm buidling for Guix, which uses a build-container that does not contain /home nor /usr/bin, thus I patches some paths. This worked  fine with Qt 5.9


test                url orig          url in guix build
------------------  ---------------   ------------------------------
file double slash   file://home       file://tmp
file triple slash   file:///home      file:///tmp
file single slash   file:/home        file:/tmp
file multiple path  file://usr/bin    file:/tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0
invalid file path   file://bad/path   file://bad/path
protocol-less path  /home             /tmp


$ ls -la /
total 24
drwxr-x---   7 0 nixbld 4096 May 30 08:12 .
drwxr-x---   7 0 nixbld 4096 May 30 08:12 ..
drwxr-xr-x   4 0      0 4096 May 30 08:12 dev
drwxr-xr-x   2 0      0 4096 May 30 08:12 etc
drwxr-xr-x   3 0      0 4096 May 30 08:12 gnu
dr-xr-xr-x 210 0      0    0 May 30 08:12 proc
drwxrwxrwt   3 0      0 4096 May 30 08:12 tmp

$ ls -la /tmp
total 8
drwxrwxrwt 3      0      0 4096 May 30 08:12 .
drwxr-x--- 7      0 nixbld 4096 May 30 08:12 ..
drwx------ 3 nixbld nixbld   80 May 30 08:12 guix-build-krunner-5.46.0.drv-0

$ ls -la /tmp/guix-build-krunner-5.46.0.drv-0/krunner-5.46.0
total 56
drwxr-xr-x 6 nixbld nixbld   280 May  5 12:39 .
drwx------ 3 nixbld nixbld    80 May 30 08:12 ..
-rw-r--r-- 1 nixbld nixbld    57 May  5 12:39 .arcconfig
drwxr-xr-x 2 nixbld nixbld   200 May  5 12:39 autotests
-rw-r--r-- 1 nixbld nixbld  3652 May  5 12:39 CMakeLists.txt
-rw-r--r-- 1 nixbld nixbld 26530 May  5 12:39 COPYING.LIB
-rw-r--r-- 1 nixbld nixbld   178 May  5 12:39 ExtraDesktop.sh
-rw-r--r-- 1 nixbld nixbld   530 May  5 12:39 KF5RunnerConfig.cmake.in
-rw-r--r-- 1 nixbld nixbld    24 May  5 12:39 krunner.categories
-rw-r--r-- 1 nixbld nixbld   347 May  5 12:39 metainfo.yaml
-rw-r--r-- 1 nixbld nixbld   666 May  5 12:39 README.md
drwxr-xr-x 4 nixbld nixbld   420 May  5 12:39 src
drwxr-xr-x 3 nixbld nixbld    80 May  5 12:39 templates
drwxr-xr-x 2 nixbld nixbld   100 May  5 12:39 tests
Comment 2 h.goebel 2018-05-30 11:21:59 UTC
Update: This might not be related to Qt 5.11, since KF 5.46 fails also when building for Qt 5.9:

           kf5.42         kf5.46
qt 5.9      pass           fail
qt 5.11    build fails     fail


- The test is unchanged since years [1]
- Only one change to runnercontext.cpp since 5.42 [2] - which should be unrelated
- One commit [4] spotted for Qt 5.11 QUrl [3], which might be relevant.

[1] <https://cgit.kde.org/krunner.git/log/autotests/runnercontexttest.cpp>
[2] <https://cgit.kde.org/krunner.git/log/src/runnercontext.cpp>
[3] <https://code.qt.io/cgit/qt/qtbase.git/log/src/corelib/io/qurl.cpp?h=5.11>
[4] <https://code.qt.io/cgit/qt/qtbase.git/commit/src/corelib/io/qurl.cpp?id=f62768d0465286>
Comment 3 h.goebel 2018-12-20 09:45:23 UTC
This is caused by changes in extra-cmake-modules, which effected the install paths, see <https://cgit.kde.org/extra-cmake-modules.git/commit/kde-modules/KDEInstallDirs.cmake?id=dbe4d2d7f9d6e8179d38a73481e59d5ebb4c43fe>. This change did require a change in guix, which has has been missed.