summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordac <qt-info@nokia.com>2010-07-23 10:24:19 +1000
committerdac <qt-info@nokia.com>2010-07-23 10:24:19 +1000
commitdff9fdff49679aaf332ec0bbc219104c2e2eb73d (patch)
tree69cecba61cd8f062543a68f3d09920e7540e4261
parentf8279460c968463838002c8c78b4b2d11f403cbb (diff)
parent1931f3cd66378759593f14a4ce5c5bee864733ed (diff)
Merge branch 'master' of scm.dev.nokia.troll.no:research/qtuitest
-rw-r--r--examples/cppsystemtest/cppsystemtest.pro6
-rw-r--r--interpreter/interpreter.pro4
-rw-r--r--interpreter/qscriptsystemtest.cpp86
-rw-r--r--interpreter/qscriptsystemtest.h12
-rw-r--r--libqsystemtest/libqsystemtest.pro4
-rw-r--r--libqsystemtest/qabstracttest.cpp8
-rw-r--r--libqsystemtest/qabstracttest.h7
-rw-r--r--libqsystemtest/qsystemtest.cpp28
-rw-r--r--libqsystemtest/qsystemtest.h7
-rw-r--r--libqtslave/libqtslave.pro4
-rw-r--r--libqtslave/qtestslave.cpp11
-rw-r--r--libqtuitest/libqtuitest.pro4
-rw-r--r--plugins/qtuitest_widgets/hbwidgets/hbwidgets.pro4
-rw-r--r--plugins/qtuitest_widgets/qgraphicsviewwidgets/qgraphicsviewwidgets.pro4
-rw-r--r--plugins/qtuitest_widgets/qmlwidgets/qmlwidgets.pro4
-rw-r--r--plugins/qtuitest_widgets/qtwidgets/qtwidgets.pro4
-rw-r--r--plugins/styles/qtuitest/qtuitest.pro4
-rw-r--r--qtbindings/qtscript_core/qtscript_core.pro7
-rw-r--r--qtuitest-host.pri67
-rw-r--r--tests/qtuitest/sys_assistant/sys_assistant.pro7
-rw-r--r--tests/qtuitest/sys_designer/sys_designer.pro7
-rw-r--r--tests/qtuitest/sys_graphicsView/sys_graphicsView.pro7
-rw-r--r--tests/qtuitest/sys_input/sys_input.pro7
-rw-r--r--tests/qtuitest/sys_linguist/sys_linguist.pro7
-rw-r--r--tests/qtuitest/testapps/fileDialogSaveApp/fileDialogSaveApp.pro7
-rw-r--r--tests/qtuitest/testapps/graphicsViewTest/graphicsViewTest.pro7
-rw-r--r--tests/qtuitest/testapps/testapp1/testapp1.pro4
-rw-r--r--tests/qtuitest/testapps/testapp2/testapp2.pro4
-rw-r--r--tests/qtuitest/testapps/testapp3/testapp3.pro4
-rw-r--r--tests/qtuitest/testapps/testapp4/testapp4.pro4
-rw-r--r--tests/qtuitest/tst_qalternatestack/tst_qalternatestack.pro7
-rw-r--r--tests/qtuitest/tst_qelapsedtimer/tst_qelapsedtimer.pro7
-rw-r--r--tests/qtuitest/tst_qinputgenerator/tst_qinputgenerator.pro7
-rw-r--r--tests/qtuitest/tst_qtestprotocol/tst_qtestprotocol.pro7
-rw-r--r--tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.cpp2
-rw-r--r--tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.pro7
-rw-r--r--tests/qtuitest/tst_qtuitestwidgets/tst_qtuitestwidgets.pro7
37 files changed, 370 insertions, 14 deletions
diff --git a/examples/cppsystemtest/cppsystemtest.pro b/examples/cppsystemtest/cppsystemtest.pro
index a435b4c..faeac4b 100644
--- a/examples/cppsystemtest/cppsystemtest.pro
+++ b/examples/cppsystemtest/cppsystemtest.pro
@@ -25,3 +25,9 @@ mac {
CONFIG+=qtestlib debug
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target
diff --git a/interpreter/interpreter.pro b/interpreter/interpreter.pro
index eb3be3f..c91e4ee 100644
--- a/interpreter/interpreter.pro
+++ b/interpreter/interpreter.pro
@@ -57,3 +57,7 @@ mac {
CONFIG(debug,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest_debug -lqtuitest_debug
CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest -lqtuitest
}
+
+
+target.path += \
+ /usr/local/bin \ No newline at end of file
diff --git a/interpreter/qscriptsystemtest.cpp b/interpreter/qscriptsystemtest.cpp
index 93b0725..2dbe531 100644
--- a/interpreter/qscriptsystemtest.cpp
+++ b/interpreter/qscriptsystemtest.cpp
@@ -489,6 +489,89 @@ bool QScriptSystemTest::setQueryError( const QString &errString )
return ret;
}
+#ifdef QTCREATOR_QTEST
+int QScriptSystemTest::runTest(const QString &fname, const QStringList &parameters,
+ const QStringList &environment)
+{
+ m_env = environment;
+ qDebug() << "Running " << fname;
+ filename = fname;
+
+ QFile file(filename);
+ if (!file.open(QFile::ReadOnly)) {
+ qDebug() << "Can't open " << filename;
+ return -1;
+ }
+
+ QTextStream stream(&file);
+ QString script = stream.readAll();
+
+ ScriptPreprocessor().preprocess(script);
+
+ setupEnums(&m_engine);
+
+ // include() imports scripts directly into the parent script.
+ m_engine.globalObject().setProperty
+ ("include", m_engine.newFunction(includeFunction, 1));
+ m_engine.globalObject().setProperty
+ ("setFlags", m_engine.newFunction(setFlags, 3));
+
+
+ m_engine.globalObject().setProperty("_dateToString", m_engine.newFunction(dateToString));
+ m_engine.evaluate("_old_date_toString = Date.prototype.toString;"
+ "Date.prototype.toString = function() {"
+ " if (arguments[0] == undefined)"
+ " return _old_date_toString.apply(this, arguments);"
+ " return _dateToString.apply(this, arguments);"
+ "}");
+
+ m_engine.globalObject().setProperty("ParentTestObject", m_engine.newQObject(this));
+ m_engine.globalObject().setProperty("ParentTestMetaObject", m_engine.newQMetaObject(metaObject()));
+
+ loadBuiltins(m_engine);
+ importIntoGlobalNamespace(m_engine, "ParentTestObject");
+
+ // Allow shebangs without giving syntax errors.
+ if (script.startsWith("#!")) script.prepend("//");
+ script.prepend("with(ParentTestMetaObject){");
+ script.append("\n}");
+
+ QtScriptTest tc(filename, script, &m_engine);
+ testObject = &tc;
+
+ qScriptRegisterMetaType(&m_engine, variantToScriptValue, variantFromScriptValue);
+ qScriptRegisterSequenceMetaType<QList<qint64> >(&m_engine);
+
+ // Only set up the test data path if not explicitly set by user
+ if (!QCoreApplication::arguments().contains("-data")) {
+ setupTestDataPath(qPrintable(filename));
+ }
+
+ enableQueryWarnings(false);
+
+ // If we get here, the syntax of the script is definitely OK
+ // (a syntax error causes a qFatal in the QtScriptTest ctor).
+ if (m_checkOnly)
+ return 0;
+
+ // If an IDE is connected, set the agent to enable script debugging
+ if (testIDE() && testIDE()->isConnected()) {
+ m_engine.setAgent(m_agent);
+ }
+
+ int retval = QTest::qExec(&tc, parameters);
+
+ testObject = 0;
+
+ // After a full test run, QTestLib sometimes returns 0 or sometimes returns
+ // the number of test failures, depending on how it was compiled. In both
+ // cases, a negative number denotes an error.
+ // We don't want test failures to affect the exit code.
+ return (retval < 0) ? retval : 0;
+}
+#endif
+
+#ifndef QTCREATOR_QTEST
int QScriptSystemTest::runTest(int argc, char *argv[])
{
if (argc > 1) filename = argv[1];
@@ -574,6 +657,7 @@ int QScriptSystemTest::runTest(int argc, char *argv[])
// We don't want test failures to affect the exit code.
return (retval < 0) ? retval : 0;
}
+#endif
/*!
\internal
@@ -630,6 +714,7 @@ QVariantMap QScriptSystemTest::sendRaw(const QString& event, const QScriptValue&
return ret;
}
+#ifndef QTCREATOR_QTEST
/*!
\internal
Print any special usage information which should be shown when test is launched
@@ -644,6 +729,7 @@ void QScriptSystemTest::printUsage(int argc, char *argv[]) const
" contains any syntax errors.\n"
);
}
+#endif
/*!
\internal
diff --git a/interpreter/qscriptsystemtest.h b/interpreter/qscriptsystemtest.h
index b7b185c..7244db3 100644
--- a/interpreter/qscriptsystemtest.h
+++ b/interpreter/qscriptsystemtest.h
@@ -65,6 +65,11 @@ public:
void scriptPositionChange(qint64, int, int);
void scriptContextChange(bool);
+#ifdef QTCREATOR_QTEST
+ virtual int runTest(const QString &fname, const QStringList &parameters,
+ const QStringList &environment);
+#endif
+
public slots:
virtual bool fail(QString const &message);
virtual void expectFail( const QString &reason );
@@ -86,13 +91,14 @@ protected:
virtual bool setQueryError( const QTestMessage &message );
virtual bool setQueryError( const QString &errString );
+#ifndef QTCREATOR_QTEST
virtual int runTest(int argc, char *argv[]);
+ virtual void printUsage(int,char*[]) const;
+#endif
+ virtual void processCommandLine(int&, char*[]);
virtual bool isFailExpected();
- virtual void processCommandLine(int&, char*[]);
- virtual void printUsage(int,char*[]) const;
-
virtual void processMessage(const QTestMessage& message);
diff --git a/libqsystemtest/libqsystemtest.pro b/libqsystemtest/libqsystemtest.pro
index 97bdb32..f0ff053 100644
--- a/libqsystemtest/libqsystemtest.pro
+++ b/libqsystemtest/libqsystemtest.pro
@@ -68,3 +68,7 @@ mac {
CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest
DEFINES+=sighandler_t=sig_t
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/libqsystemtest/qabstracttest.cpp b/libqsystemtest/qabstracttest.cpp
index 0b0a5a5..bf6ea0b 100644
--- a/libqsystemtest/qabstracttest.cpp
+++ b/libqsystemtest/qabstracttest.cpp
@@ -305,6 +305,7 @@ QString QAbstractTest::currentTestFunction( bool fullName ) const
return fullName ? (testCaseName() + "::" + QTest::currentTestFunction()) : (QTest::currentTestFunction());
}
+#ifndef QTCREATOR_QTEST
/*
\internal
Executes all test functions as specified on the command line, while running the
@@ -337,7 +338,9 @@ int QAbstractTest::exec( int argc, char* argv[], char* filename )
delete[] _argv;
return ret;
}
+#endif
+#ifndef QTCREATOR_QTEST
/*
\internal
Print a usage message.
@@ -383,6 +386,7 @@ void QAbstractTest::printUsage( int argc, char* argv[] ) const
" of the directory containing the test source file, then in $HOME/.qtest\n"
, (argc) ? argv[0] : "test");
}
+#endif
/*
\internal
@@ -451,8 +455,10 @@ void QAbstractTest::processCommandLine( int &argc, char* argv[] )
!strcasecmp(argv[i], "-h") ) {
argv[i] = 0;
offset++;
+#ifndef QTCREATOR_QTEST
printUsage(argc-offset, argv);
exit(0);
+#endif
// Silently ignore a few system test specific arguments.
// For compatibility, we'll silently ignore these so that
@@ -495,6 +501,7 @@ void handle_segfault(int signum)
}
#endif
+# ifndef QTCREATOR_QTEST
/*
\internal
Run test with arguments \a argc, \a argv, and return an exit code.
@@ -511,6 +518,7 @@ int QAbstractTest::runTest(int argc, char *argv[])
return QTest::qExec( this, argc, argv );
return -1;
}
+#endif
/*!
\internal
diff --git a/libqsystemtest/qabstracttest.h b/libqsystemtest/qabstracttest.h
index 69ee0ee..10a2a14 100644
--- a/libqsystemtest/qabstracttest.h
+++ b/libqsystemtest/qabstracttest.h
@@ -46,7 +46,7 @@
#include <QObject>
#include <QTest>
-#include <qtuitestglobal.h>
+#include "qtuitestglobal.h"
#include <qdebug.h>
class QSYSTEMTEST_EXPORT Autotest_QLog {
@@ -109,7 +109,9 @@ public:
, QObject *parent = 0);
virtual ~QAbstractTest();
+# ifndef QTCREATOR_QTEST
int exec( int argc, char* argv[], char* filename = 0 );
+# endif
#endif
public slots:
@@ -129,9 +131,12 @@ public slots:
#ifndef Q_QDOC
protected:
+# ifndef QTCREATOR_QTEST
virtual int runTest(int argc, char *argv[]);
virtual void printUsage( int argc, char *argv[] ) const;
+# endif
virtual void processCommandLine( int &argc, char *argv[] );
+
virtual void setupTestDataPath(const char *filename);
#endif
diff --git a/libqsystemtest/qsystemtest.cpp b/libqsystemtest/qsystemtest.cpp
index 882164d..0dde6dd 100644
--- a/libqsystemtest/qsystemtest.cpp
+++ b/libqsystemtest/qsystemtest.cpp
@@ -2307,9 +2307,14 @@ void QSystemTest::startApplication( const QString &application, const QStringLis
}
TestProcess* proc = new TestProcess(this);
- proc->test = this;
+#ifdef QTCREATOR_QTEST
+ proc->setEnvironment(m_env);
+#else
proc->env = m_env;
proc->env << QString("QTUITEST_PORT=%1").arg(m_aut_port);
+#endif
+
+ proc->test = this;
#ifdef Q_OS_MAC
args << QString("-style=qtuitest");
@@ -2342,7 +2347,7 @@ void QSystemTest::startApplication( const QString &application, const QStringLis
}
// Give it a little time for the slave to come up.
- wait(3000);
+ wait(100);
if (!connectToAut(timeout)) {
fail(QString("Could not connect to process '%1'.").arg(app));
@@ -2620,7 +2625,13 @@ bool QSystemTest::runsOnDevice()
*/
void QSystemTest::wait(int msecs)
{
- QTest::qWait(msecs);
+// QTest::qWait(msecs);
+ QTime t;
+ t.start();
+ while (t.elapsed() < msecs) {
+ qApp->processEvents();
+ }
+ qDebug() << "waited" << t.elapsed() << " ms";
}
/*!
@@ -3039,6 +3050,7 @@ void QSystemTest::abortTest()
#endif
}
+#ifndef QTCREATOR_QTEST
/*!
\internal
Print any special usage information which should be shown when test is launched
@@ -3078,6 +3090,7 @@ void QSystemTest::printUsage(int argc, char *argv[]) const
, DEFAULT_AUT_PORT
);
}
+#endif
#ifndef Q_QDOC
/*
@@ -3271,6 +3284,7 @@ bool QSystemTest::setQueryError( const QTestMessage &message )
return false; // query is NOT successfull
}
+#ifndef QTCREATOR_QTEST
/*!
\internal
Launch AUT and run the test.
@@ -3281,6 +3295,7 @@ int QSystemTest::runTest(int argc, char *argv[]) {
return QAbstractTest::runTest(argc, argv);
}
+#endif
/*!
\internal
@@ -3295,6 +3310,7 @@ bool QSystemTest::connectToAut(int timeout)
if (!m_test_app)
m_test_app = new QSystemTestMaster( this );
+ bool first_time = true;
QTime t;
t.start();
while (t.elapsed() < timeout && !isConnected()) {
@@ -3302,9 +3318,11 @@ bool QSystemTest::connectToAut(int timeout)
m_test_app->waitForConnected(2000);
if (!m_test_app->isConnected()) {
if (m_test_app->error() == QAbstractSocket::ConnectionRefusedError) {
- qLog(QtUitest) << qPrintable(QString("Connection refused while trying to connect to test app on %1:%2").arg(m_aut_host).arg(m_aut_port)) ;
+ if (first_time) {
+ qLog(QtUitest) << qPrintable(QString("Connection refused while trying to connect to test app on %1:%2. Retrying ... ").arg(m_aut_host).arg(m_aut_port)) ;
+ first_time = false;
+ }
}
- QTest::qWait(100);
}
}
diff --git a/libqsystemtest/qsystemtest.h b/libqsystemtest/qsystemtest.h
index 17d9bd1..edb1455 100644
--- a/libqsystemtest/qsystemtest.h
+++ b/libqsystemtest/qsystemtest.h
@@ -392,9 +392,11 @@ protected slots:
void abortTest();
protected:
+#ifndef QTCREATOR_QTEST
virtual void printUsage(int,char*[]) const;
- virtual void processCommandLine(int&,char*[]);
virtual int runTest(int,char*[]);
+#endif
+ virtual void processCommandLine(int&,char*[]);
virtual void applicationStandardOutput(QList<QByteArray> const&);
virtual void applicationStandardError(QList<QByteArray> const&);
@@ -470,6 +472,9 @@ signals:
void appGainedFocus(QString const &appName);
void appBecameIdle(QString const &appName);
+protected:
+ QStringList m_env;
+
private:
friend class QSystemTestMaster;
friend class QSystemTestPrivate;
diff --git a/libqtslave/libqtslave.pro b/libqtslave/libqtslave.pro
index 9e0b232..d06cdb2 100644
--- a/libqtslave/libqtslave.pro
+++ b/libqtslave/libqtslave.pro
@@ -50,3 +50,7 @@ mac {
CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/libqtslave/qtestslave.cpp b/libqtslave/qtestslave.cpp
index 7c4edb9..a4ac20a 100644
--- a/libqtslave/qtestslave.cpp
+++ b/libqtslave/qtestslave.cpp
@@ -59,6 +59,7 @@
#include <QLocale>
#include <QDebug>
#include <QPainter>
+#include <QSound>
#ifndef QT_NO_CLIPBOARD
# include <QClipboard>
@@ -106,9 +107,13 @@ public:
QTestSlavePrivate(QTestSlave *parent)
: eventRecordingEnabled(false),
p(parent),
- recorder(this),
- targetId(QLatin1String("default"))
- {}
+ recorder(this),
+ targetId(QLatin1String("default"))
+ {
+ // Play a sound as a audible confirmation that an app is started with QtUITest plugin loaded
+ QString fname = QDir::homePath() + QDir::separator() + "qtuitest.wav";
+ if (QFile::exists(fname)) QSound::play(fname);
+ }
bool event(QEvent *e);
bool waitForIdle(int timeout = 10000);
diff --git a/libqtuitest/libqtuitest.pro b/libqtuitest/libqtuitest.pro
index 8207b32..bcd9beb 100644
--- a/libqtuitest/libqtuitest.pro
+++ b/libqtuitest/libqtuitest.pro
@@ -83,3 +83,7 @@ TARGET=qtuitest
TARGET=$$qtLibraryTarget($$TARGET)
CONFIG-=debug_and_release_target
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/plugins/qtuitest_widgets/hbwidgets/hbwidgets.pro b/plugins/qtuitest_widgets/hbwidgets/hbwidgets.pro
index 18af6d4..b455eea 100644
--- a/plugins/qtuitest_widgets/hbwidgets/hbwidgets.pro
+++ b/plugins/qtuitest_widgets/hbwidgets/hbwidgets.pro
@@ -58,3 +58,7 @@ mac {
CONFIG(debug,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest_debug
CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/plugins/qtuitest_widgets/qgraphicsviewwidgets/qgraphicsviewwidgets.pro b/plugins/qtuitest_widgets/qgraphicsviewwidgets/qgraphicsviewwidgets.pro
index 98a9d13..6129f33 100644
--- a/plugins/qtuitest_widgets/qgraphicsviewwidgets/qgraphicsviewwidgets.pro
+++ b/plugins/qtuitest_widgets/qgraphicsviewwidgets/qgraphicsviewwidgets.pro
@@ -51,3 +51,7 @@ mac {
CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/plugins/qtuitest_widgets/qmlwidgets/qmlwidgets.pro b/plugins/qtuitest_widgets/qmlwidgets/qmlwidgets.pro
index 1920030..d635b3b 100644
--- a/plugins/qtuitest_widgets/qmlwidgets/qmlwidgets.pro
+++ b/plugins/qtuitest_widgets/qmlwidgets/qmlwidgets.pro
@@ -49,3 +49,7 @@ contains(QT_CONFIG, webkit) {
SOURCES+=testdeclarativewebview.cpp
HEADERS+=testdeclarativewebview.h
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/plugins/qtuitest_widgets/qtwidgets/qtwidgets.pro b/plugins/qtuitest_widgets/qtwidgets/qtwidgets.pro
index bef8035..463b25f 100644
--- a/plugins/qtuitest_widgets/qtwidgets/qtwidgets.pro
+++ b/plugins/qtuitest_widgets/qtwidgets/qtwidgets.pro
@@ -104,3 +104,7 @@ contains(QT_CONFIG, webkit) {
SOURCES+=testwebview.cpp
HEADERS+=testwebview.h
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/plugins/styles/qtuitest/qtuitest.pro b/plugins/styles/qtuitest/qtuitest.pro
index 56343fe..747a07e 100644
--- a/plugins/styles/qtuitest/qtuitest.pro
+++ b/plugins/styles/qtuitest/qtuitest.pro
@@ -42,3 +42,7 @@ win32 {
INSTALLS+=target
}
+
+
+target.path += \
+ /usr/local/lib \ No newline at end of file
diff --git a/qtbindings/qtscript_core/qtscript_core.pro b/qtbindings/qtscript_core/qtscript_core.pro
index c1da436..5b7f14d 100644
--- a/qtbindings/qtscript_core/qtscript_core.pro
+++ b/qtbindings/qtscript_core/qtscript_core.pro
@@ -6,3 +6,10 @@ include($$GENERATEDCPP/com_nokia_qt_core/com_nokia_qt_core.pri)
symbian {
TARGET.EPOCALLOWDLLDATA=1
}
+
+
+target.path += \
+ /usr/local/lib
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/qtuitest-host.pri b/qtuitest-host.pri
new file mode 100644
index 0000000..b2f7f87
--- /dev/null
+++ b/qtuitest-host.pri
@@ -0,0 +1,67 @@
+SOURCES +=\
+ $$QTUITEST_SRC/interpreter/qscriptsystemtest.cpp \
+ $$QTUITEST_SRC/interpreter/qtscript_bindings.cpp \
+ $$QTUITEST_SRC/interpreter/qtuitestengineagent.cpp \
+ $$QTUITEST_SRC/interpreter/scriptpreprocessor.cpp
+
+HEADERS +=\
+ $$QTUITEST_SRC/interpreter/qscriptsystemtest.h \
+ $$QTUITEST_SRC/interpreter/scriptpreprocessor.h \
+ $$QTUITEST_SRC/interpreter/qtuitestengineagent.h \
+ $$QTUITEST_SRC/interpreter/qtscript_bindings.h
+
+RESOURCES += $$QTUITEST_SRC/interpreter/scripts.qrc
+DEFINES += QTUITESTRUNNER_TARGET
+INCLUDEPATH += $$QTUITEST_SRC/libqsystemtest $$QTUITEST_SRC/interpreter $$QTUITEST_SRC $$QTUITEST_SRC/libqtuitest
+#VPATH+=$$PWD
+QT+=script network
+CONFIG+=qtestlib
+
+# stuff to include libqsystemtest
+DEFINES += QSYSTEMTEST_TARGET
+
+FORMS +=\
+ $$QTUITEST_SRC/libqsystemtest/manualverificationdlg.ui \
+ $$QTUITEST_SRC/libqsystemtest/failuredlg.ui \
+ $$QTUITEST_SRC/libqsystemtest/recorddlg.ui
+
+SEMI_PRIVATE_HEADERS += \
+ $$QTUITEST_SRC/libqsystemtest/qsystemtestmaster_p.h \
+ $$QTUITEST_SRC/libqsystemtest/qtestremote_p.h \
+ $$QTUITEST_SRC/libqsystemtest/qtestverifydlg_p.h
+
+HEADERS +=\
+# $$QTUITEST_SRC/libqsystemtest/gracefulquit.h \
+ $$QTUITEST_SRC/libqsystemtest/qabstracttest.h \
+ $$QTUITEST_SRC/libqsystemtest/qsystemtest.h
+
+SOURCES +=\
+ # $$QTUITEST_SRC/libqsystemtest/gracefulquit.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qabstracttest.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qtestremote.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qtestverifydlg.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qsystemtest.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qsystemtest_p.cpp \
+ $$QTUITEST_SRC/libqsystemtest/qsystemtestmaster.cpp
+
+HEADERS*=$$SEMI_PRIVATE_HEADERS $$PRIVATE_HEADERS
+
+symbian {
+ TARGET.EPOCALLOWDLLDATA=1
+ TARGET.CAPABILITY += AllFiles ReadDeviceData ReadUserData SwEvent WriteUserData
+ # SOURCES-=$$QTUITEST_SRC/libqsystemtest/gracefulquit.cpp
+ # HEADERS-=$$QTUITEST_SRC/libqsystemtest/gracefulquit.h
+ LIBS+=-L$$OUT_PWD -lws32 -leuser -lcone
+}
+
+win32 {
+ # SOURCES-=$$QTUITEST_SRC/libqsystemtest/gracefulquit.cpp
+ # HEADERS-=$$QTUITEST_SRC/libqsystemtest/gracefulquit.h
+ !equals(QMAKE_CXX, "g++") {
+ DEFINES+=strcasecmp=_stricmp
+ }
+}
+
+mac {
+ DEFINES+=sighandler_t=sig_t
+}
diff --git a/tests/qtuitest/sys_assistant/sys_assistant.pro b/tests/qtuitest/sys_assistant/sys_assistant.pro
index 79485c9..a057ba3 100644
--- a/tests/qtuitest/sys_assistant/sys_assistant.pro
+++ b/tests/qtuitest/sys_assistant/sys_assistant.pro
@@ -1,2 +1,9 @@
SOURCES=sys_assistant.qtt
CONFIG+=systemtest
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/sys_designer/sys_designer.pro b/tests/qtuitest/sys_designer/sys_designer.pro
index a394b57..2fa97f5 100644
--- a/tests/qtuitest/sys_designer/sys_designer.pro
+++ b/tests/qtuitest/sys_designer/sys_designer.pro
@@ -1,2 +1,9 @@
SOURCES=sys_designer.qtt
CONFIG+=systemtest
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/sys_graphicsView/sys_graphicsView.pro b/tests/qtuitest/sys_graphicsView/sys_graphicsView.pro
index 4cae852..a74cb42 100644
--- a/tests/qtuitest/sys_graphicsView/sys_graphicsView.pro
+++ b/tests/qtuitest/sys_graphicsView/sys_graphicsView.pro
@@ -1,3 +1,10 @@
SOURCES=sys_graphicsView.qtt
TESTAPPS=graphicsViewTest
CONFIG+=systemtest
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/sys_input/sys_input.pro b/tests/qtuitest/sys_input/sys_input.pro
index 270dca3..ada46f4 100644
--- a/tests/qtuitest/sys_input/sys_input.pro
+++ b/tests/qtuitest/sys_input/sys_input.pro
@@ -1,3 +1,10 @@
SOURCES=sys_input.qtt
TESTAPPS=testapp1 testapp2 testapp3
CONFIG+=systemtest
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target
+
diff --git a/tests/qtuitest/sys_linguist/sys_linguist.pro b/tests/qtuitest/sys_linguist/sys_linguist.pro
index 3d5e676..0f2a803 100644
--- a/tests/qtuitest/sys_linguist/sys_linguist.pro
+++ b/tests/qtuitest/sys_linguist/sys_linguist.pro
@@ -1,2 +1,9 @@
SOURCES=sys_linguist.qtt
CONFIG+=systemtest
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/testapps/fileDialogSaveApp/fileDialogSaveApp.pro b/tests/qtuitest/testapps/fileDialogSaveApp/fileDialogSaveApp.pro
index 82bb3dd..ca4194c 100644
--- a/tests/qtuitest/testapps/fileDialogSaveApp/fileDialogSaveApp.pro
+++ b/tests/qtuitest/testapps/fileDialogSaveApp/fileDialogSaveApp.pro
@@ -10,3 +10,10 @@ mac:DESTDIR=$$BUILDROOT/bin
# Input
SOURCES += main.cpp
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/testapps/graphicsViewTest/graphicsViewTest.pro b/tests/qtuitest/testapps/graphicsViewTest/graphicsViewTest.pro
index 5166947..d1cb25f 100644
--- a/tests/qtuitest/testapps/graphicsViewTest/graphicsViewTest.pro
+++ b/tests/qtuitest/testapps/graphicsViewTest/graphicsViewTest.pro
@@ -6,3 +6,10 @@ INCLUDEPATH += .
HEADERS += mainwindow.h
SOURCES += main.cpp mainwindow.cpp
mac:DESTDIR=$$BUILDROOT/bin
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/testapps/testapp1/testapp1.pro b/tests/qtuitest/testapps/testapp1/testapp1.pro
index f612e8e..6d4d015 100644
--- a/tests/qtuitest/testapps/testapp1/testapp1.pro
+++ b/tests/qtuitest/testapps/testapp1/testapp1.pro
@@ -18,3 +18,7 @@ win32 {
mac {
CONFIG-=app_bundle
}
+
+
+target.path += \
+ /usr/local/bin \ No newline at end of file
diff --git a/tests/qtuitest/testapps/testapp2/testapp2.pro b/tests/qtuitest/testapps/testapp2/testapp2.pro
index 04c09f0..ee17bd4 100644
--- a/tests/qtuitest/testapps/testapp2/testapp2.pro
+++ b/tests/qtuitest/testapps/testapp2/testapp2.pro
@@ -15,3 +15,7 @@ win32 {
mac {
CONFIG-=app_bundle
}
+
+
+target.path += \
+ /usr/local/bin \ No newline at end of file
diff --git a/tests/qtuitest/testapps/testapp3/testapp3.pro b/tests/qtuitest/testapps/testapp3/testapp3.pro
index 04c09f0..ee17bd4 100644
--- a/tests/qtuitest/testapps/testapp3/testapp3.pro
+++ b/tests/qtuitest/testapps/testapp3/testapp3.pro
@@ -15,3 +15,7 @@ win32 {
mac {
CONFIG-=app_bundle
}
+
+
+target.path += \
+ /usr/local/bin \ No newline at end of file
diff --git a/tests/qtuitest/testapps/testapp4/testapp4.pro b/tests/qtuitest/testapps/testapp4/testapp4.pro
index 04c09f0..ee17bd4 100644
--- a/tests/qtuitest/testapps/testapp4/testapp4.pro
+++ b/tests/qtuitest/testapps/testapp4/testapp4.pro
@@ -15,3 +15,7 @@ win32 {
mac {
CONFIG-=app_bundle
}
+
+
+target.path += \
+ /usr/local/bin \ No newline at end of file
diff --git a/tests/qtuitest/tst_qalternatestack/tst_qalternatestack.pro b/tests/qtuitest/tst_qalternatestack/tst_qalternatestack.pro
index 905e99c..07546a8 100644
--- a/tests/qtuitest/tst_qalternatestack/tst_qalternatestack.pro
+++ b/tests/qtuitest/tst_qalternatestack/tst_qalternatestack.pro
@@ -8,3 +8,10 @@ CONFIG-=debug_and_release_target
SOURCES+= \
tst_qalternatestack.cpp
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/tst_qelapsedtimer/tst_qelapsedtimer.pro b/tests/qtuitest/tst_qelapsedtimer/tst_qelapsedtimer.pro
index e915e3b..da914e0 100644
--- a/tests/qtuitest/tst_qelapsedtimer/tst_qelapsedtimer.pro
+++ b/tests/qtuitest/tst_qelapsedtimer/tst_qelapsedtimer.pro
@@ -7,3 +7,10 @@ CONFIG-=debug_and_release_target
SOURCES+= \
tst_qelapsedtimer.cpp
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/tst_qinputgenerator/tst_qinputgenerator.pro b/tests/qtuitest/tst_qinputgenerator/tst_qinputgenerator.pro
index ac0d31d..4398ab6 100644
--- a/tests/qtuitest/tst_qinputgenerator/tst_qinputgenerator.pro
+++ b/tests/qtuitest/tst_qinputgenerator/tst_qinputgenerator.pro
@@ -15,3 +15,10 @@ else {
SOURCES+=nativeevent_noop.cpp
}
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/tst_qtestprotocol/tst_qtestprotocol.pro b/tests/qtuitest/tst_qtestprotocol/tst_qtestprotocol.pro
index 3f6e0b4..54d1ce6 100644
--- a/tests/qtuitest/tst_qtestprotocol/tst_qtestprotocol.pro
+++ b/tests/qtuitest/tst_qtestprotocol/tst_qtestprotocol.pro
@@ -17,3 +17,10 @@ HEADERS+= \
symbian {
LIBS+=-L$$OUT_PWD/ -lqtuitest
}
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.cpp b/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.cpp
index 64b5a32..d40723e 100644
--- a/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.cpp
+++ b/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.cpp
@@ -46,7 +46,7 @@
#include <QAction>
#include <QCoreApplication>
#include <QObject>
-#include <QTest>
+#include <QtTest/QTest>
#include <qalternatestack_p.h>
#include <qtuitestconnectionmanager_p.h>
diff --git a/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.pro b/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.pro
index eba25e3..b672977 100644
--- a/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.pro
+++ b/tests/qtuitest/tst_qtuitestnamespace/tst_qtuitestnamespace.pro
@@ -7,3 +7,10 @@ CONFIG-=debug_and_release_target
SOURCES+= \
tst_qtuitestnamespace.cpp
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file
diff --git a/tests/qtuitest/tst_qtuitestwidgets/tst_qtuitestwidgets.pro b/tests/qtuitest/tst_qtuitestwidgets/tst_qtuitestwidgets.pro
index 57742c0..85a8eaa 100644
--- a/tests/qtuitest/tst_qtuitestwidgets/tst_qtuitestwidgets.pro
+++ b/tests/qtuitest/tst_qtuitestwidgets/tst_qtuitestwidgets.pro
@@ -17,3 +17,10 @@ symbian {
win32 {
LIBS+=$$OUT_PWD/../../lib/qtuitest.lib
}
+
+
+target.path += \
+ /usr/local/bin
+
+INSTALLS += \
+ target \ No newline at end of file