purpose unittests on Windows

Ben Cooksley bcooksley at kde.org
Mon Aug 13 10:06:12 BST 2018


On Mon, Aug 13, 2018 at 1:16 AM David Faure <faure at kde.org> wrote:
>
> On samedi 11 août 2018 07:02:18 CEST Ben Cooksley wrote:
> > On Fri, Aug 10, 2018 at 7:28 PM David Faure <faure at kde.org> wrote:
> > > Any idea why purpose can't find the KIO http and file protocols -- on
> > > Windows?
> > >
> > > https://build.kde.org/view/Frameworks/job/Frameworks%20purpose%20kf5-qt5%2
> > > 0WindowsMSVCQt5.10/76/testReport/junit/(root)/TestSuite/alternativesmodelt
> > > est/
> > >
> > > That's very odd, because the dependency from purpose on kio is there in
> > > kde-build-metadata (it wouldn't build otherwise), and using kio_file from
> > > other frameworks surely works (e.g. in KParts).
> > >
> > > The lookup for protocols looks for "kf5/kio" under all Qt plugin
> > > directories, i.e. $QT_PLUGIN_PATH.
> > >
> > > The CI log says
> > > QT_PLUGIN_PATH            = 'C:\CI\workspace\Frameworks purpose kf5-qt5
> > > WindowsMSVCQt5.10\install-prefix\lib\plugins;C:\Craft\CI\windows-msvc2017
> > > _64-cl-debug\lib\qca-qt5'
> > >
> > > => is there a kf5\kio subdir in C:\CI\workspace\Frameworks purpose kf5-qt5
> > > WindowsMSVCQt5.10\install-prefix\lib\plugins ?
> > I've checked and the following seem to be present in that directory,
> > which looks correct to me:
> >
> > Mode                LastWriteTime         Length Name
> > ----                -------------         ------ ----
> > -a----        8/10/2018   8:39 PM         274944 file.dll
> > -a----        8/10/2018   8:40 PM         352256 ftp.dll
> > -a----        8/10/2018   8:40 PM         185856 ghelp.dll
> > -a----        8/10/2018   8:39 PM         185856 help.dll
> > -a----        8/10/2018   8:45 PM         946688 http.dll
> > -a----        8/10/2018   8:40 PM         189440 remote.dll
> > -a----        8/10/2018   8:40 PM         122880 trash.dll
> >
> > Is there any debug output we can enable to see how it is searching for
> > the plugins?
>
> I have now added debug output to kcoreaddons and kio, and the result is:
>
>     Checking for plugins in ("C:/CI/workspace/Frameworks purpose kf5-qt5 WindowsMSVCQt5.10/build/bin/kf5/kio", "C:/Craft/CI/windows-msvc2017_64-cl-debug/plugins/kf5/kio")
>
> This list doesn't include the above directory, C:\CI\workspace\Frameworks purpose kf5-qt5 WindowsMSVCQt5.10\install-prefix\lib\plugins.
>
> Yet, ECMAddTests.cmake adds to QT_PLUGIN_PATH, it doesn't overwrite it...
> I wonder if set(PATHSEP "\\;") is correct though (why double backslash?)
> QCoreApplication::libraryPaths reads that env var and splits it using QDir::listSeparator() which is ';' on Windows.
> Kevin, any reason for the backslash?
> Do you see any other reason for this to fail, otherwise?

Hi all,

I've done some investigation work on this on the CI system this
morning and it seems that it isn't even necessary to set
QT_PLUGIN_PATH within ECMAddTests (at least on Windows anyway)

QDEBUG : AlternativesModelTest::bigBufferTest() org.kde.kcoreaddons:
Checking for plugins in ("C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio",
"C:/Craft/CI/windows-msvc2017_64-cl-debug/lib/qca-qt5/kf5/kio",
"C:/Craft/CI/windows-msvc2017_64-cl-debug/plugins/kf5/kio",
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/build/bin/kf5/kio")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/file.dll"
supports protocols ("file")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/ftp.dll" supports
protocols ("ftp")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/ghelp.dll"
supports protocols ("ghelp")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/help.dll"
supports protocols ("help")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/http.dll"
supports protocols ("http", "https", "webdav", "webdavs")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
"C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/install-prefix/lib/plugins/kf5/kio/remote.dll"
supports protocols ("remote")
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core:
Refilling KProtocolInfoFactory cache in the hope to find "data"

The above seems correct as far as I can tell?

Unfortunately doing this doesn't fix the test as it's unable to find
kioslave.exe, even though it exists in $workspace/install-prefix/bin/
so not sure what's happening there:

QWARN  : AlternativesModelTest::bigBufferTest() kf5.kio.core: couldn't
create slave: "Can not find 'kioslave' executable at
'C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/build/bin,
C:/Craft/CI/windows-msvc2017_64-cl-debug/bin,
C:/CI/workspace/Frameworks kio kf5-qt5
WindowsMSVCQt5.10/install-prefix/bin'"
QDEBUG : AlternativesModelTest::bigBufferTest() kf5.kio.core.copyjob:
d->state= 6
QWARN  : AlternativesModelTest::bigBufferTest() error! 173 " Can not
find 'kioslave' executable at 'C:/CI/workspace/Frameworks purpose
kf5-qt5 WindowsMSVCQt5.10/build/bin,
C:/Craft/CI/windows-msvc2017_64-cl-debug/bin,
C:/CI/workspace/Frameworks kio kf5-qt5
WindowsMSVCQt5.10/install-prefix/bin'" " Can not find 'kioslave'
executable at 'C:/CI/workspace/Frameworks purpose kf5-qt5
WindowsMSVCQt5.10/build/bin,
C:/Craft/CI/windows-msvc2017_64-cl-debug/bin,
C:/CI/workspace/Frameworks kio kf5-qt5
WindowsMSVCQt5.10/install-prefix/bin'"

Directory of C:\CI\workspace\Frameworks purpose kf5-qt5
WindowsMSVCQt5.10\install-prefix\bin
08/12/2018  06:21 AM            62,464 kioslave.exe

Cheers,
Ben

>
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Working on KDE Frameworks 5
>
>
>


More information about the Kde-frameworks-devel mailing list