Bug 329994 - Testcase KTranscriptTest::initTestCase only succeeds when ktranscript.so is already installed below $PREFIX
Summary: Testcase KTranscriptTest::initTestCase only succeeds when ktranscript.so is a...
Status: VERIFIED FIXED
Alias: None
Product: frameworks-ki18n
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 14:05 UTC by Achim Bohnet
Modified: 2014-01-17 08:08 UTC (History)
3 users (show)

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 Achim Bohnet 2014-01-15 14:05:28 UTC
Scarlett Clark <scarlett@scarlettgatelyclark.com> reported on kubuntu-devel:

1/2 Test #2: ki18n-ktranscripttest ............***Failed    0.00 sec
********* Start testing of KTranscriptTest *********
Config: Using QtTest library 5.2.0, Qt 5.2.0
FAIL!  : KTranscriptTest::initTestCase() '!pluginPath.isEmpty()' returned 
FALSE. ()
   Loc: [../../autotests/ktranscripttest.cpp(59)]
PASS   : KTranscriptTest::cleanupTestCase()
Totals: 1 passed, 1 failed, 0 skipped

And after spending more time than I would like to admit, I have found that it 
is not possible for it to pass considering ki18n package is the one that 
provides ktranscript.so .... of course it does not exist. Once I ran the 
debuild skipping tests and installed the resulting package, the tests passed. 


Reproducible: Always

Steps to Reproduce:
1. remove the installed version of ktranscript.so
2. build from source
3. run the tests
Actual Results:  
KTranscriptTest::initTestCase fails

Expected Results:  
KTranscriptTest::initTestCase should succeed :-)
Comment 1 Harald Sitter 2014-01-15 14:13:24 UTC
confirmed in a neon5 envrionment

debug output in ktransscripttest.cpp for:
>     Q_FOREACH (const QString &dirPath, QCoreApplication::libraryPaths()) {
>       qDebug() << dirPath;

2: Test command: /home/me/src/git/k/ki18n/nb/autotests/ktranscripttest
2: Test timeout computed to be: 9.99988e+06
2: ********* Start testing of KTranscriptTest *********
2: Config: Using QtTest library 5.2.1, Qt 5.2.1
2: QDEBUG : KTranscriptTest::initTestCase() ktranscripttest(23853)/default findKTranscriptPlugin: "/opt/project-neon5/plugins" 
2: QDEBUG : KTranscriptTest::initTestCase() ktranscripttest(23853)/default findKTranscriptPlugin: "/home/me/src/git/k/ki18n/nb/autotests" 
2: QDEBUG : KTranscriptTest::initTestCase() ktranscripttest(23853)/default findKTranscriptPlugin: "/opt/project-neon5/lib/x86_64-linux-gnu/plugins" 
2: QDEBUG : KTranscriptTest::initTestCase() ktranscripttest(23853)/default findKTranscriptPlugin: "/usr/lib/kde4/plugins" 
2: FAIL!  : KTranscriptTest::initTestCase() '!pluginPath.isEmpty()' returned FALSE. ()
2:    Loc: [/home/me/src/git/k/ki18n/autotests/ktranscripttest.cpp(60)]
2: PASS   : KTranscriptTest::cleanupTestCase()
2: Totals: 1 passed, 1 failed, 0 skipped
2: ********* Finished testing of KTranscriptTest *********
2/2 Test #2: ki18n-ktranscripttest ............***Failed    0.01 sec
Comment 2 Aurelien Gateau 2014-01-16 11:07:35 UTC
Proposed fix here: https://git.reviewboard.kde.org/r/115049/
Comment 3 Aurelien Gateau 2014-01-16 13:33:11 UTC
Git commit a61ed9a6e9751983de41c5f00fa057180a78ef6d by Aurélien Gâteau.
Committed on 16/01/2014 at 12:56.
Pushed by gateau into branch 'master'.

Do not require ktranscript to be installed for the test to run
REVIEW: 115022

M  +4    -0    autotests/CMakeLists.txt
M  +2    -18   autotests/ktranscripttest.cpp

http://commits.kde.org/ki18n/a61ed9a6e9751983de41c5f00fa057180a78ef6d