[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [simon/mac] simonlib/simoncontextdetection/test: Alternative executable path on Macs; Longer delays
From:       Peter Grasch <me () bedahr ! org>
Date:       2014-03-31 19:09:28
Message-ID: E1WUhaK-000362-Ay () scm ! kde ! org
[Download RAW message or body]

Git commit d91b36e3fcad9f6066f0a6f9a8e1641350a791d2 by Peter Grasch.
Committed on 31/03/2014 at 18:58.
Pushed by grasch into branch 'mac'.

Alternative executable path on Macs; Longer delays

M  +12   -5    simonlib/simoncontextdetection/test/processinfogatherertest.cpp

http://commits.kde.org/simon/d91b36e3fcad9f6066f0a6f9a8e1641350a791d2

diff --git a/simonlib/simoncontextdetection/test/processinfogatherertest.cpp \
b/simonlib/simoncontextdetection/test/processinfogatherertest.cpp index \
                f5162b3..f956665 100644
--- a/simonlib/simoncontextdetection/test/processinfogatherertest.cpp
+++ b/simonlib/simoncontextdetection/test/processinfogatherertest.cpp
@@ -52,8 +52,11 @@ void processInfoGathererTest::initTestCase()
 
   app = new KApplication(true);
   proc = new KProcess();
+#ifndef Q_OS_MAC
   proc->setProgram(qApp->applicationDirPath() + QDir::separator() + \
                "dummyapplication");
-  qDebug() << proc->program();
+#else
+  proc->setProgram(qApp->applicationDirPath() + \
"/../../../dummyapplication.app/Contents/MacOS/dummyapplication"); +#endif
   
   delete[] argv;
   delete[] appName;
@@ -70,9 +73,13 @@ void processInfoGathererTest::testProcessTracking()
   QString thisExecutable = QFileInfo(qApp->applicationFilePath()).fileName();
   ProcessInfo::instance(); //setting up
 
-  QTest::qWait(500);
+#ifdef Q_OS_MAC
+  qWarning() << "If this test fails, make sure that you *disabled* the option to \
change the terminal's window title " +                "according to the running \
application in it's preferences as this interferes with the test."; +#endif
+
+  QTest::qWait(1200);
 
-  qDebug() << "Testing process tracking" << thisExecutable;
   QSignalSpy spyAdd(ProcessInfo::instance(), SIGNAL(processAdded(QString)));
   QSignalSpy spyRem(ProcessInfo::instance(), SIGNAL(processRemoved(QString)));
   QSignalSpy spyTitleChanged(ProcessInfo::instance(), \
SIGNAL(activeWindowTitleChanged(QString))); @@ -84,7 +91,7 @@ void \
processInfoGathererTest::testProcessTracking()  
   proc->start();
   proc->waitForStarted();
-  QTest::qWait(1000);
+  QTest::qWait(1200);
 
   QVERIFY(ProcessInfo::instance()->getRunningProcesses().contains(thisExecutable));
   QVERIFY(ProcessInfo::instance()->getRunningProcesses().contains("dummyapplication"));
 @@ -109,7 +116,7 @@ void processInfoGathererTest::testProcessTracking()
 
   proc->terminate();
   proc->waitForFinished();
-  QTest::qWait(1000);
+  QTest::qWait(1200);
 
   QVERIFY(ProcessInfo::instance()->getRunningProcesses().contains(thisExecutable));
   QVERIFY(!ProcessInfo::instance()->getRunningProcesses().contains("dummyapplication"));



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic