Review Request 115049: Do not require ktranscript to be installed for the test to run
Aurélien Gâteau
agateau at kde.org
Thu Jan 16 12:59:13 UTC 2014
> On Jan. 16, 2014, 12:11 p.m., Aleix Pol Gonzalez wrote:
> > autotests/ktranscripttest.cpp, line 52
> > <https://git.reviewboard.kde.org/r/115049/diff/1/?file=234121#file234121line52>
> >
> > This limits the cwd. Maybe you can pass it as a preprocess definition?
> > aka with add_definitions(-DKTRANSCRIPT_PATH=${blah}) ).
>
> Aurélien Gâteau wrote:
> What do you mean with "this limits the cwd"?
>
> Alex Merry wrote:
> I think Aleix's comment was based on a misreading of the code; using QCoreApplication::applicationDir() means it doesn't depend on the cwd.
>
> But can I suggest a simpler approach, where you put
> target_compile_definitions(ktranscripttest PRIVATE "TRANSCRIPT_FILE=\"$<TARGET_FILE:ktranscript>\"")
> in the CMakeLists.txt and replace findKTranscriptPlugin() with QStringLiteral(TRANSCRIPT_FILE)? You might also want to add
> QVERIFY(QFile::exists(pluginPath));
Good idea. I was reluctant to do a plain add_definition() because of potential issues with space char escaping, but using a generator as you suggest should avoid this.
- Aurélien
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115049/#review47490
-----------------------------------------------------------
On Jan. 16, 2014, 1:58 p.m., Aurélien Gâteau wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115049/
> -----------------------------------------------------------
>
> (Updated Jan. 16, 2014, 1:58 p.m.)
>
>
> Review request for KDE Frameworks and Chusslove Illich.
>
>
> Bugs: 329994
> https://bugs.kde.org/show_bug.cgi?id=329994
>
>
> Repository: ki18n
>
>
> Description
> -------
>
> Kubuntu packagers had problems running "make test" because the ktranscript test relied on the ktranscript plugin being installed to run. This RR avoids this by loading the plugin from the build dir.
>
>
> Diffs
> -----
>
> autotests/CMakeLists.txt 9e5fa0c
> autotests/ktranscripttest.cpp db8139a
>
> Diff: https://git.reviewboard.kde.org/r/115049/diff/
>
>
> Testing
> -------
>
> Reverted install dir to a "before KF5" state, installed KJS, built ki18n without installing, ran the test successfully.
>
>
> Thanks,
>
> Aurélien Gâteau
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140116/85ef705f/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list