aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHolger Schröder <holger.schroeder.ext@basyskom.de>2010-11-30 17:03:57 +0100
committerHolger Schröder <holger.schroeder.ext@basyskom.de>2010-11-30 20:18:52 +0100
commitbfdb6f624f74f4804a341b36b1c2d867d97d3923 (patch)
tree8de888fb3e4c262eb83c840dfe680c02aeac3ac2 /tests
parent4ac1a9b0497ec6230701539abfa171ed1823a99b (diff)
Fixes: NB#208549 - ft_mmoc aborts
RevBy: Mike Fabian Details: For some reason the qt moc is not installed on the device in the current test environment. Without it the ft_mmoc tests cannot be executed. This patch skips this test in this case. This should fix this bug. Also this test does not need to link against QtGui, so i changed it to use QCoreApplication for the appliation directory path.
Diffstat (limited to 'tests')
-rw-r--r--tests/ft_mmoc/ft_mmoc.cpp8
-rw-r--r--tests/ft_mmoc/ft_mmoc.pro4
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/ft_mmoc/ft_mmoc.cpp b/tests/ft_mmoc/ft_mmoc.cpp
index e35c7b84..e464d561 100644
--- a/tests/ft_mmoc/ft_mmoc.cpp
+++ b/tests/ft_mmoc/ft_mmoc.cpp
@@ -41,7 +41,9 @@ void Ft_MMoc::initTestCase()
m_binaryMmoc = "/usr/bin/mmoc";
m_binaryMmocFound = QFileInfo( m_binaryMmoc ).exists();
- if ( !m_binaryMmocFound && !m_perlMmocFound ) {
+ if ( ( ! m_qtMocFound )
+ || ( !m_binaryMmocFound && !m_perlMmocFound )
+ ) {
QSKIP( "need development environment", SkipAll );
}
}
@@ -77,7 +79,7 @@ void Ft_MMoc::doMMoc_data()
QTest::addColumn<QString>("fileName");
// test all .h files in samples subdir.
- QStringList files( QDir(QApplication::applicationDirPath() + "/ft_mmoc-samples" ).
+ QStringList files( QDir(QCoreApplication::applicationDirPath() + "/ft_mmoc-samples" ).
entryList( QStringList("*.h") ) );
foreach ( QString file, files )
{
@@ -99,7 +101,7 @@ void Ft_MMoc::doMMoc()
QFETCH( QString, mocPath );
QFETCH( QString, fileName );
- QString path = QApplication::applicationDirPath() + "/ft_mmoc-samples/";
+ QString path = QCoreApplication::applicationDirPath() + "/ft_mmoc-samples/";
qWarning( "testing: moc: %s file: %s",
qPrintable( mocPath ),
diff --git a/tests/ft_mmoc/ft_mmoc.pro b/tests/ft_mmoc/ft_mmoc.pro
index dc9c8ce1..b8cf7ee2 100644
--- a/tests/ft_mmoc/ft_mmoc.pro
+++ b/tests/ft_mmoc/ft_mmoc.pro
@@ -1,5 +1,9 @@
include(../common_top.pri)
+# no need to link against qtgui for this command line app test
+CONFIG -= meegotouch
+QT -= gui
+
TARGET = ft_mmoc
SOURCES += \