diff options
author | dac <qt-info@nokia.com> | 2010-07-30 13:23:57 +1000 |
---|---|---|
committer | dac <qt-info@nokia.com> | 2010-07-30 13:23:57 +1000 |
commit | 40d2b818e3299e8af6b7a7349871411fe026734c (patch) | |
tree | f5216555e8730aee8c8e42e7152124e850a16b7e | |
parent | 1aa37e3fe72fd8cd90e79f62e0e00896703bd207 (diff) |
Get QtUiTest (X11 standalone) working again.
-rw-r--r-- | coreplugin/coreplugin.pro | 56 | ||||
-rw-r--r-- | features/systemtest.prf | 16 | ||||
-rw-r--r-- | interpreter/interpreter.pro | 26 | ||||
-rw-r--r-- | interpreter/qtscript_bindings.cpp | 3 | ||||
-rw-r--r-- | libqsystemtest/desktoptestcontrol.cpp | 7 | ||||
-rw-r--r-- | libqsystemtest/desktoptestcontrol.h | 1 | ||||
-rw-r--r-- | libqsystemtest/libqsystemtest.pro | 79 | ||||
-rw-r--r-- | libqsystemtest/testcontrol.cpp | 11 | ||||
-rw-r--r-- | libqtslave/libqtslave.pro | 2 | ||||
-rw-r--r-- | qtuitest.pro | 35 |
10 files changed, 144 insertions, 92 deletions
diff --git a/coreplugin/coreplugin.pro b/coreplugin/coreplugin.pro new file mode 100644 index 0000000..d847cc3 --- /dev/null +++ b/coreplugin/coreplugin.pro @@ -0,0 +1,56 @@ +TEMPLATE = lib +TARGET = Core +DESTDIR = $$BUILDROOT/lib +CONFIG += static +INCLUDEPATH += .. ../botan/build +LIBS+=-L$$BUILDROOT/lib -lBotan + +HEADERS +=\ + ssh/sftpchannel.h \ + ssh/sftpchannel_p.h \ + ssh/sftpdefs.h \ + ssh/sftpincomingpacket_p.h \ + ssh/sftpoperation_p.h \ + ssh/sftpoutgoingpacket_p.h \ + ssh/sftppacket_p.h \ + ssh/sshbotanconversions_p.h \ + ssh/sshcapabilities_p.h \ + ssh/sshchannel_p.h \ + ssh/sshchannelmanager_p.h \ + ssh/sshconnection.h \ + ssh/sshconnection_p.h \ + ssh/sshcryptofacility_p.h \ + ssh/sshdelayedsignal_p.h \ + ssh/ssherrors.h \ + ssh/sshexception_p.h \ + ssh/sshincomingpacket_p.h \ + ssh/sshkeyexchange_p.h \ + ssh/sshkeygenerator.h \ + ssh/sshoutgoingpacket_p.h \ + ssh/sshpacket_p.h \ + ssh/sshpacketparser_p.h \ + ssh/sshremoteprocess.h \ + ssh/sshremoteprocess_p.h \ + ssh/sshsendfacility_p.h + +SOURCES +=\ + ssh/sftpchannel.cpp \ + ssh/sftpdefs.cpp \ + ssh/sftpincomingpacket.cpp \ + ssh/sftpoperation.cpp \ + ssh/sftpoutgoingpacket.cpp \ + ssh/sftppacket.cpp \ + ssh/sshcapabilities.cpp \ + ssh/sshchannel.cpp \ + ssh/sshchannelmanager.cpp \ + ssh/sshconnection.cpp \ + ssh/sshcryptofacility.cpp \ + ssh/sshdelayedsignal.cpp \ + ssh/sshincomingpacket.cpp \ + ssh/sshkeyexchange.cpp \ + ssh/sshkeygenerator.cpp \ + ssh/sshoutgoingpacket.cpp \ + ssh/sshpacket.cpp \ + ssh/sshpacketparser.cpp \ + ssh/sshremoteprocess.cpp \ + ssh/sshsendfacility.cpp diff --git a/features/systemtest.prf b/features/systemtest.prf index 72bc6e4..61b12e9 100644 --- a/features/systemtest.prf +++ b/features/systemtest.prf @@ -10,16 +10,16 @@ unix:!mac:!symbian { fi QMAKE_EXTRA_TARGETS+=symlink -# testapp_symlink.commands = \ -# for app in $$TESTAPPS; do \ -# APPPATH=$$BUILDROOT/tests/qtuitest/testapps/\$\$app; \ -# [ -d \$\$APPPATH ] || continue; \ -# ln -sf \$\$APPPATH/\$\$app $$BUILDDIR/\$\$app; \ -# done -# QMAKE_EXTRA_TARGETS+=testapp_symlink + testapp_symlink.commands = \ + for app in $$TESTAPPS; do \ + APPPATH=$$BUILDROOT/tests/qtuitest/testapps/\$\$app; \ + [ -d \$\$APPPATH ] || continue; \ + ln -sf \$\$APPPATH/\$\$app $$BUILDDIR/\$\$app; \ + done + QMAKE_EXTRA_TARGETS+=testapp_symlink test.commands = PATH=$$BUILDDIR:$$BUILDROOT/bin:\$\$PATH QTUITEST_INCLUDE_PATH=$$SRCROOT/tests/shared:\$\$QTUITEST_INCLUDE_PATH $$[QT_INSTALL_BINS]/qtuitestrunner $$BUILDDIR/$$SOURCES $(ARGS) -# test.depends = symlink testapp_symlink + test.depends = symlink testapp_symlink test.depends = symlink QMAKE_EXTRA_TARGETS+=test diff --git a/interpreter/interpreter.pro b/interpreter/interpreter.pro index 8e2a941..0c9705f 100644 --- a/interpreter/interpreter.pro +++ b/interpreter/interpreter.pro @@ -17,12 +17,10 @@ TEMPLATE=app VPATH+=$$PWD INCLUDEPATH+=$$PWD INCLUDEPATH+=$$SRCROOT -INCLUDEPATH+=$$SRCROOT/libqtuitest INCLUDEPATH+=$$SRCROOT/libqsystemtest QT+=script network CONFIG+=qtestlib TARGET=qtuitestrunner -LIBS+=-L$$BUILDROOT/lib -lBotan !symbian { MOC_DIR=$$OUT_PWD/.moc @@ -32,17 +30,17 @@ LIBS+=-L$$BUILDROOT/lib -lBotan INSTALLS+=target } -symbian { - TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY += AllFiles ReadDeviceData ReadUserData SwEvent WriteUserData - MOC_DIR=$$OUT_PWD/moc - OBJECTS_DIR=$$OUT_PWD/obj - LIBS += -L$$OUT_PWD -lqsystemtest -lqtuitest -} +#symbian { +# TARGET.EPOCALLOWDLLDATA=1 +# TARGET.CAPABILITY += AllFiles ReadDeviceData ReadUserData SwEvent WriteUserData +# MOC_DIR=$$OUT_PWD/moc +# OBJECTS_DIR=$$OUT_PWD/obj +# LIBS += -L$$OUT_PWD -lqsystemtest +#} win32 { - CONFIG(debug,debug|release): LIBS+=-L$$BUILDROOT/libqsystemtest/debug -lqsystemtestd -L$$BUILDROOT/libqtuitest -lqtuitestd - CONFIG(release,debug|release):LIBS+=-L$$BUILDROOT/libqsystemtest/release -lqsystemtest -L$$BUILDROOT/libqtuitest -lqtuitest -L$$BUILDROOT/libqtslave/release -lqtslave + CONFIG(debug,debug|release): LIBS+=-L$$BUILDROOT/libqsystemtest/debug -lqsystemtestd + CONFIG(release,debug|release):LIBS+=-L$$BUILDROOT/libqsystemtest/release -lqsystemtest target.path=$$[QT_INSTALL_BINS] INSTALLS+=target !equals(QMAKE_CXX, "g++") { @@ -51,12 +49,12 @@ win32 { } !win32:!symbian:!mac { - LIBS += -L$$BUILDROOT/lib -lqsystemtest -lqtuitest + LIBS += -L$$BUILDROOT/lib -lqsystemtest -lBotan -lCore } mac { CONFIG-=app_bundle - CONFIG(debug,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest_debug -lqtuitest_debug - CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest -lqtuitest + CONFIG(debug,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest_debug + CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqsystemtest } diff --git a/interpreter/qtscript_bindings.cpp b/interpreter/qtscript_bindings.cpp index b93aeff..b53d664 100644 --- a/interpreter/qtscript_bindings.cpp +++ b/interpreter/qtscript_bindings.cpp @@ -238,10 +238,9 @@ QtScriptTest::QtScriptTest(QString const &testFilePath, QString const &scriptDat } if (!error.isEmpty()) { QString backtrace = m_engine->uncaughtExceptionBacktrace().join("\n"); + qWarning("%s\n%s", qPrintable(error), qPrintable(backtrace)); m_status = StatusException; return; -// qFatal("%s\n%s", qPrintable(error), -// qPrintable(backtrace)); } QScriptValue testcase = m_engine->globalObject().property("testcase"); QScriptValueIterator it(testcase); diff --git a/libqsystemtest/desktoptestcontrol.cpp b/libqsystemtest/desktoptestcontrol.cpp index 2529c5e..085a220 100644 --- a/libqsystemtest/desktoptestcontrol.cpp +++ b/libqsystemtest/desktoptestcontrol.cpp @@ -6,6 +6,11 @@ using namespace Qt4Test; +DesktopTestControl* DesktopTestControl::instance() +{ + static DesktopTestControl instance; + return &instance; +} DesktopTestControl::DesktopTestControl() : TestControl() @@ -58,8 +63,6 @@ bool DesktopTestControl::startApplication( const QString &application, const QSt bool DesktopTestControl::killApplication( const QString &application, QString &reply ) { - return true; - if (!proc) return false; diff --git a/libqsystemtest/desktoptestcontrol.h b/libqsystemtest/desktoptestcontrol.h index f8dd9dd..9b1a301 100644 --- a/libqsystemtest/desktoptestcontrol.h +++ b/libqsystemtest/desktoptestcontrol.h @@ -101,6 +101,7 @@ class DesktopTestControl : public TestControl { Q_OBJECT public: + static DesktopTestControl* instance(); DesktopTestControl(); virtual ~DesktopTestControl(); diff --git a/libqsystemtest/libqsystemtest.pro b/libqsystemtest/libqsystemtest.pro index 83bf8c2..c267d98 100644 --- a/libqsystemtest/libqsystemtest.pro +++ b/libqsystemtest/libqsystemtest.pro @@ -8,14 +8,19 @@ FORMS +=\ SEMI_PRIVATE_HEADERS += \ qsystemtestmaster_p.h \ qtestremote_p.h \ + qtestprotocol_p.h \ qtestverifydlg_p.h HEADERS +=\ qabstracttest.h \ qsystemtest.h \ qtestide.h \ - qtestprotocol.h \ - testdevicecontrol.h + testcontrol.h \ + maemotestcontrol.h \ + meegotestcontrol.h \ + symbiantestcontrol.h \ + desktoptestcontrol.h \ + customtestcontrol.h SOURCES +=\ qabstracttest.cpp \ @@ -26,59 +31,12 @@ SOURCES +=\ qsystemtest_p.cpp \ qsystemtestmaster.cpp \ qtestprotocol.cpp \ - testdevicecontrol.cpp - -HEADERS +=\ - ../coreplugin/ssh/sftpchannel.h \ - ../coreplugin/ssh/sftpchannel_p.h \ - ../coreplugin/ssh/sftpdefs.h \ - ../coreplugin/ssh/sftpincomingpacket_p.h \ - ../coreplugin/ssh/sftpoperation_p.h \ - ../coreplugin/ssh/sftpoutgoingpacket_p.h \ - ../coreplugin/ssh/sftppacket_p.h \ - ../coreplugin/ssh/sshbotanconversions_p.h \ - ../coreplugin/ssh/sshcapabilities_p.h \ - ../coreplugin/ssh/sshchannel_p.h \ - ../coreplugin/ssh/sshchannelmanager_p.h \ - ../coreplugin/ssh/sshconnection.h \ - ../coreplugin/ssh/sshconnection_p.h \ - ../coreplugin/ssh/sshcryptofacility_p.h \ - ../coreplugin/ssh/sshdelayedsignal_p.h \ - ../coreplugin/ssh/ssherrors.h \ - ../coreplugin/ssh/sshexception_p.h \ - ../coreplugin/ssh/sshincomingpacket_p.h \ - ../coreplugin/ssh/sshkeyexchange_p.h \ - ../coreplugin/ssh/sshkeygenerator.h \ - ../coreplugin/ssh/sshoutgoingpacket_p.h \ - ../coreplugin/ssh/sshpacket_p.h \ - ../coreplugin/ssh/sshpacketparser_p.h \ - ../coreplugin/ssh/sshremoteprocess.h \ - ../coreplugin/ssh/sshremoteprocess_p.h \ - ../coreplugin/ssh/sshsendfacility_p.h - -SOURCES +=\ - ../coreplugin/ssh/sftpchannel.cpp \ - ../coreplugin/ssh/sftpdefs.cpp \ - ../coreplugin/ssh/sftpincomingpacket.cpp \ - ../coreplugin/ssh/sftpoperation.cpp \ - ../coreplugin/ssh/sftpoutgoingpacket.cpp \ - ../coreplugin/ssh/sftppacket.cpp \ - ../coreplugin/ssh/sshcapabilities.cpp \ - ../coreplugin/ssh/sshchannel.cpp \ - ../coreplugin/ssh/sshchannelmanager.cpp \ - ../coreplugin/ssh/sshconnection.cpp \ - ../coreplugin/ssh/sshcryptofacility.cpp \ - ../coreplugin/ssh/sshdelayedsignal.cpp \ - ../coreplugin/ssh/sshincomingpacket.cpp \ - ../coreplugin/ssh/sshkeyexchange.cpp \ - ../coreplugin/ssh/sshkeygenerator.cpp \ - ../coreplugin/ssh/sshoutgoingpacket.cpp \ - ../coreplugin/ssh/sshpacket.cpp \ - ../coreplugin/ssh/sshpacketparser.cpp \ - ../coreplugin/ssh/sshremoteprocess.cpp \ - ../coreplugin/ssh/sshsendfacility.cpp - - + testcontrol.cpp \ + maemotestcontrol.cpp \ + meegotestcontrol.cpp \ + symbiantestcontrol.cpp \ + desktoptestcontrol.cpp \ + customtestcontrol.cpp VPATH+=$$PWD INCLUDEPATH+=$$PWD @@ -91,10 +49,9 @@ TEMPLATE=lib TARGET=qsystemtest TARGET=$$qtLibraryTarget($$TARGET) HEADERS*=$$SEMI_PRIVATE_HEADERS $$PRIVATE_HEADERS -#INCLUDEPATH+=$$SRCROOT/libqtuitest -CONFIG+=qtestlib +CONFIG+=qtestlib staticlib QT+=network script -LIBS+=-L$$BUILDROOT/lib -lBotan +LIBS+=-L$$BUILDROOT/lib -lBotan -lCore unix:!symbian { DESTDIR=$$BUILDROOT/lib @@ -105,12 +62,10 @@ unix:!symbian { symbian { TARGET.EPOCALLOWDLLDATA=1 TARGET.CAPABILITY += AllFiles ReadDeviceData ReadUserData SwEvent WriteUserData - LIBS+=-L$$OUT_PWD -lqtuitest -lws32 -leuser -lcone + LIBS+=-L$$OUT_PWD -lws32 -leuser -lcone } win32 { - CONFIG(debug,debug|release): LIBS+=-L$$BUILDROOT/libqtuitest -lqtuitestd - CONFIG(release,debug|release):LIBS+=-L$$BUILDROOT/libqtuitest -lqtuitest target.path=$$[QT_INSTALL_BINS] INSTALLS+=target !equals(QMAKE_CXX, "g++") { @@ -119,8 +74,6 @@ win32 { } mac { - CONFIG(debug,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest_debug - CONFIG(release,debug|release): LIBS += -L$$BUILDROOT/lib -lqtuitest DEFINES+=sighandler_t=sig_t } diff --git a/libqsystemtest/testcontrol.cpp b/libqsystemtest/testcontrol.cpp index 54ae0be..75cf279 100644 --- a/libqsystemtest/testcontrol.cpp +++ b/libqsystemtest/testcontrol.cpp @@ -82,14 +82,19 @@ TestControl* TestController::controlFactory() { if (test_device_type == Maemo) return new MaemoTestControl(ssh_param); +// return MaemoTestControl::instance(ssh_param); else if (test_device_type == Desktop) - return new DesktopTestControl(); +// return new DesktopTestControl(); + return DesktopTestControl::instance(); else if (test_device_type == MeeGo) return new MeeGoTestControl(); +// return MeeGoTestControl::instance(); else if (test_device_type == Custom) return new CustomTestControl(); +// return CustomTestControl::instance(); else if (test_device_type == Symbian) return new SymbianTestControl(); +// return SymbianTestControl::instance(); return 0; } @@ -106,7 +111,7 @@ bool TestController::startApplication( const QString &application, const QString { TestControl *ctrl = controlFactory(); if (ctrl) { - device_controls.append(ctrl); +// device_controls.append(ctrl); if (ctrl->startApplication(application, arguments, styleQtUITest, environment, reply)) { started_applications += application; return true; @@ -119,7 +124,7 @@ bool TestController::killApplication( const QString &application, QString &reply { TestControl *ctrl = controlFactory(); if (ctrl) { - device_controls.append(ctrl); +// device_controls.append(ctrl); return ctrl->killApplication(application, reply); } return false; diff --git a/libqtslave/libqtslave.pro b/libqtslave/libqtslave.pro index 1a3d207..bbcd350 100644 --- a/libqtslave/libqtslave.pro +++ b/libqtslave/libqtslave.pro @@ -6,6 +6,8 @@ QT+=network DEFINES+=QTSLAVE_TARGET INCLUDEPATH+=$$PWD +INCLUDEPATH += $$SRCROOT/libqtuitest + include($$SRCROOT/libqtuitest/libqtuitest.pri) # we need to set a MAEMO define since this is not yet in Qt diff --git a/qtuitest.pro b/qtuitest.pro new file mode 100644 index 0000000..329911b --- /dev/null +++ b/qtuitest.pro @@ -0,0 +1,35 @@ +TEMPLATE=subdirs +SUBDIRS+=libqtuitest libqtslave plugins qtbindings botan coreplugin libqsystemtest interpreter tests +CONFIG += ordered + +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/botan/build + +system(echo QMAKEFEATURES+=$$PWD/features >> $$OUT_PWD/.qmake.cache) + +unix:!mac:!symbian { + system(if ! [ -e $$OUT_PWD/features ]; then ln -sf $$PWD/features $$OUT_PWD/features; fi) + system(echo SRCROOT=$(readlink -f $$PWD) >> $$OUT_PWD/.qmake.cache) + system(echo BUILDROOT=$(readlink -f $$OUT_PWD) >> $$OUT_PWD/.qmake.cache) +} + +mac { + system(if ! [ -e $$OUT_PWD/features ]; then ln -sf $$PWD/features $$OUT_PWD/features; fi) + system(echo SRCROOT='$$PWD' >> $$OUT_PWD/.qmake.cache) + system(echo BUILDROOT='$$OUT_PWD' >> $$OUT_PWD/.qmake.cache) +} + +symbian { + SUBDIRS-=qtbindings libqsystemtest interpreter + system(echo SRCROOT=$$PWD >> $$OUT_PWD/.qmake.cache) + system(echo BUILDROOT=$$OUT_PWD >> $$OUT_PWD/.qmake.cache) +} + +win32 { + WIN_PWD=$$replace(PWD,/,\) + WIN_OUT_PWD=$$replace(OUT_PWD,/,\) + system(xcopy $$WIN_PWD\features $$WIN_OUT_PWD\features /E /I /D /Y) + system(echo SRCROOT=$$PWD >> $$OUT_PWD/.qmake.cache) + system(echo BUILDROOT=$$OUT_PWD >> $$OUT_PWD/.qmake.cache) + system(echo INSTALLROOT=$$OUT_PWD/bin >> $$OUT_PWD/.qmake.cache) +} |