From 11abd8edf71aa3a62d93b95977f722d761d1df32 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 14 Jun 2017 16:11:19 +0200 Subject: Squish: Replace Qt4 SDK by self-built Qt 4.8.7 Change-Id: If990367afb01aae94755930c02c81ae82b23bb8f Reviewed-by: Robert Loehning Reviewed-by: Christian Stenger --- tests/helper/README.txt | 3 + .../qmlapplicationviewer/qmlapplicationviewer.cpp | 226 +++++++++++++++++++++ .../qmlapplicationviewer/qmlapplicationviewer.h | 77 +++++++ .../qmlapplicationviewer/qmlapplicationviewer.pri | 156 ++++++++++++++ tests/system/README | 26 ++- tests/system/patch.txt | 17 ++ .../settings/mac/QtProject/qtcreator/profiles.xml | 35 +--- .../settings/mac/QtProject/qtcreator/qtversion.xml | 16 +- .../settings/unix/QtProject/qtcreator/profiles.xml | 35 +--- .../unix/QtProject/qtcreator/qtversion.xml | 18 +- .../windows/QtProject/qtcreator/profiles.xml | 44 +--- .../windows/QtProject/qtcreator/qtversion.xml | 18 +- .../windows/QtProject/qtcreator/toolchains.xml | 44 +--- tests/system/shared/classes.py | 17 +- tests/system/shared/debugger.py | 13 -- tests/system/shared/project.py | 15 +- tests/system/shared/qtcreator.py | 8 +- tests/system/suite_APTW/tst_APTW03/test.py | 9 +- tests/system/suite_CCOM/tst_CCOM01/test.py | 3 +- tests/system/suite_CSUP/tst_CSUP04/test.py | 10 +- tests/system/suite_CSUP/tst_CSUP05/test.py | 6 +- tests/system/suite_HELP/tst_HELP04/test.py | 11 +- .../suite_debugger/tst_simple_analyze/test.py | 6 - .../system/suite_debugger/tst_simple_debug/test.py | 7 - .../suite_general/tst_build_speedcrunch/test.py | 2 +- .../suite_general/tst_openqt_creator/test.py | 2 +- .../suite_general/tst_session_handling/test.py | 3 - 27 files changed, 574 insertions(+), 253 deletions(-) create mode 100644 tests/helper/README.txt create mode 100644 tests/helper/qmlapplicationviewer/qmlapplicationviewer.cpp create mode 100644 tests/helper/qmlapplicationviewer/qmlapplicationviewer.h create mode 100644 tests/helper/qmlapplicationviewer/qmlapplicationviewer.pri create mode 100644 tests/system/patch.txt (limited to 'tests') diff --git a/tests/helper/README.txt b/tests/helper/README.txt new file mode 100644 index 0000000000..64b0f3b38d --- /dev/null +++ b/tests/helper/README.txt @@ -0,0 +1,3 @@ +These files are needed by the Squish tests in tests/system. They should be +replaced by a better solution but for the time being, do not edit, move or +delete them without the consent of those maintaining the Squish tests. diff --git a/tests/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000000..0a87431867 --- /dev/null +++ b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#include // MEEGO_EDITION_HARMATTAN + +#ifdef HARMATTAN_BOOSTER +#include +#endif + +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 + +#include + +#if !defined(NO_JSDEBUGGER) +#include +#endif +#if !defined(NO_QMLOBSERVER) +#include +#endif + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QmlApplicationViewerPrivate(QDeclarativeView *view_) : view(view_) {} + + QString mainQmlFile; + QDeclarativeView *view; + friend class QmlApplicationViewer; + QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/../Resources/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#else + const QString pathInInstallDir = + QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); + if (QFileInfo(pathInInstallDir).exists()) + return pathInInstallDir; +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(this)) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::QmlApplicationViewer(QDeclarativeView *view, QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(view)) +{ + connect(view->engine(), SIGNAL(quit()), view, SLOT(close())); + view->setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete d; +} + +QmlApplicationViewer *QmlApplicationViewer::create() +{ +#ifdef HARMATTAN_BOOSTER + return new QmlApplicationViewer(MDeclarativeCache::qDeclarativeView(), 0); +#else + return new QmlApplicationViewer(); +#endif +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + d->mainQmlFile = d->adjustPath(file); + d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + d->view->engine()->addImportPath(d->adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work + if (orientation != ScreenOrientationAuto) { + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } + } +#endif // Q_OS_SYMBIAN + + Qt::WidgetAttribute attribute; + switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes + case ScreenOrientationLockPortrait: + attribute = static_cast(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(130); + break; +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; + setAttribute(attribute, true); +} + +void QmlApplicationViewer::showExpanded() +{ +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) + d->view->showFullScreen(); +#elif defined(Q_WS_MAEMO_5) + d->view->showMaximized(); +#else + d->view->show(); +#endif +} + +QApplication *createApplication(int &argc, char **argv) +{ +#ifdef HARMATTAN_BOOSTER + return MDeclarativeCache::qApplication(argc, argv); +#else + return new QApplication(argc, argv); +#endif +} diff --git a/tests/helper/qmlapplicationviewer/qmlapplicationviewer.h b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000000..724c2ff529 --- /dev/null +++ b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Symbian and Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent); + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/tests/helper/qmlapplicationviewer/qmlapplicationviewer.pri b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000000..6809b64463 --- /dev/null +++ b/tests/helper/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,156 @@ +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$_PRO_FILE_PWD_ + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + installPrefix = /opt/$${TARGET} + target.path = $${installPrefix}/bin + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + installPrefix = /opt/$${TARGET} + target.path = $${installPrefix}/bin + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + installPrefix = $$desktopInstallPrefix + target.path = $${installPrefix} + sources.files = *.cpp *.h *.desktop *.png *.pro *.qml *.qmlproject *.svg + sources.path = $$desktopInstallPrefix + export(sources.files) + export(sources.path) + INSTALLS += sources + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + export(target.path) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/tests/system/README b/tests/system/README index 0e4526d183..bcb808caf0 100644 --- a/tests/system/README +++ b/tests/system/README @@ -4,17 +4,33 @@ Squish tests inside this folder have several prerequisites to get them running. First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 6.0. -Second - some of the test suites/test cases expect an installed Qt 4 SDK in its default location. -On Linux/Mac this is ~/QtSDK, and on Windows this is C:\QtSDK. -After installing the QtSDK you should use the package manager of the QtSDK (SDKMaintenanceTool) to add some more packages. -You'll need at least Desktop Qt versions 4.7.4, 4.8.0, Harmattan stuff (except QEmu), Maemo Toolchain, Qt Examples, Simulator, Documentation files. +Second - some of the test suites/test cases expect a build of Qt 4.8.7 to be available: + 1. Download the source code from: + * Windows: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.zip + * Other: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz + 2. Extract the contents of the archive's directory qt-everywhere-opensource-src-4.8.7 to: + * Windows: C:\Qt\Qt4.8.7 + * Other: $HOME/Qt4.8.7 + 3. Apply the changes from patch.txt next to this README. + 4. In the directory you extracted the sources to, configure Qt: + * Windows (MSVC2013 32 bit): + .\configure.exe -opensource -developer-build -confirm-license -debug-and-release -nomake tests -nomake examples -nomake demos -no-webkit -no-phonon + * Linux (gcc < 6): + ./configure -opensource -developer-build -confirm-license -debug-and-release -nomake tests -nomake examples -nomake demos -no-webkit -no-phonon + * macOS: + ./configure -opensource -developer-build -confirm-license -debug-and-release -nomake tests -nomake examples -nomake demos -no-webkit -no-phonon -sdk + 5. Make: + * Windows (do not use jom): + nmake + * Other: + make -j Third - some of the test suites/test cases expect Qt 5.3.1 (default toolchain), Qt 5.4.1 (gcc, Linux and Windows only) and Qt 5.6.1-1 (default toolchain) installed in their default locations. On Linux/Mac this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1. The default toolchains are gcc on Linux, clang on Mac and MSVC2010 (Qt <= 5.5) or MSVC2013 (Qt > 5.5) on Windows. It's easiest to use default installations of the official opensource Qt packages. Fourth - you'll have to provide some additional repositories (and for the hooking into subprocesses even some more Squish bundles, see below). -These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on). +These additional repositories are located inside ~/squish-data or C:\Users\\squish-data (depending on the OS you're on). You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH. This folder must contain the following: * a QtCreator repository (or source copy) of tag v4.2.2 named 'creator' including the submodule src/shared/qbs diff --git a/tests/system/patch.txt b/tests/system/patch.txt new file mode 100644 index 0000000000..f541f32780 --- /dev/null +++ b/tests/system/patch.txt @@ -0,0 +1,17 @@ +--- src/gui/painting/qpaintengine_mac.cpp ++++ src/gui/painting/qpaintengine_mac.cpp +@@ -340,13 +340,7 @@ + } + + // Get the color space from the display profile. +- CGColorSpaceRef colorSpace = 0; +- CMProfileRef displayProfile = 0; +- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile); +- if (err == noErr) { +- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile); +- CMCloseProfile(displayProfile); +- } ++ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID); + + // Fallback: use generic DeviceRGB + if (colorSpace == 0) diff --git a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml index 002250ea9f..3df47f6a77 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml @@ -4,31 +4,6 @@ Profile.0 - - false - - - {2f514661-b9f7-4f83-8822-a9a9d0699600} - Desktop Device - Desktop - - ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} - - {461bb8dc-22ff-461f-82fe-ebe8b21b697f} - ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} - - - 4 - - :///DESKTOP/// - {4d9ea3ed-a7f0-4b0e-885f-da3b82931988} - - Desktop 474 GCC - false - - - - Profile.1 false @@ -53,7 +28,7 @@ - Profile.2 + Profile.1 false @@ -80,7 +55,7 @@ - Profile.3 + Profile.2 false @@ -100,12 +75,12 @@ :///DESKTOP/// {1dcb5509-1670-470d-80a5-8a988f36e4e2} - Desktop 480 GCC + Desktop 487 default false - Profile.4 + Profile.3 false @@ -133,7 +108,7 @@ Profile.Count - 5 + 4 Profile.Default diff --git a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml index ff94b4aa3b..77b68271ab 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml @@ -6,24 +6,14 @@ QtVersion.0 2 - Desktop Qt 4.8 for GCC (Qt SDK) - ~/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake + Desktop Qt 4.8 for GCC + ~/Qt4.8.7/bin/qmake Qt4ProjectManager.QtVersion.Desktop false QtVersion.1 - - 4 - Desktop Qt 4.7.4 for GCC (Qt SDK) - ~/QtSDK/Desktop/Qt/474/gcc/bin/qmake - Qt4ProjectManager.QtVersion.Desktop - false - - - - QtVersion.2 9 Desktop Qt 5.6.1 (SQUISH_DEFAULT_COMPILER) @@ -33,7 +23,7 @@ - QtVersion.3 + QtVersion.2 11 Desktop Qt 5.3.1 (SQUISH_DEFAULT_COMPILER) diff --git a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml index 6914de5443..265a81a89b 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml @@ -4,27 +4,6 @@ Profile.0 - - false - - - {70e26273-2c0b-4534-bbc0-eb6ca670821a} - Desktop Device - Desktop - - ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} - - 4 - - :///DESKTOP/// - {4d9ea3ed-a7f0-4b0e-885f-da3b82931988} - - Desktop 474 GCC - false - - - - Profile.1 false @@ -39,7 +18,7 @@ ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} - 4 + 2 :///DESKTOP/// {f16848fc-b615-43b5-b0cc-16a9f57fb573} @@ -49,7 +28,7 @@ - Profile.2 + Profile.1 false @@ -65,12 +44,12 @@ :///DESKTOP/// {1dcb5509-1670-470d-80a5-8a988f36e4e2} - Desktop 480 GCC + Desktop 487 default false - Profile.3 + Profile.2 false @@ -93,7 +72,7 @@ - Profile.4 + Profile.3 false @@ -117,7 +96,7 @@ - Profile.5 + Profile.4 false @@ -142,7 +121,7 @@ Profile.Count - 6 + 5 Profile.Default diff --git a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml index 96f21e9f84..b6463a4f6e 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml @@ -6,24 +6,14 @@ QtVersion.0 2 - Desktop Qt 4.8 for GCC (Qt SDK) - ~/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake + Desktop Qt 4.8 for GCC + ~/Qt4.8.7/bin/qmake Qt4ProjectManager.QtVersion.Desktop false QtVersion.1 - - 4 - Desktop Qt 4.7.4 for GCC (Qt SDK) - ~/QtSDK/Desktop/Qt/474/gcc/bin/qmake - Qt4ProjectManager.QtVersion.Desktop - false - - - - QtVersion.2 11 Qt 5.3.1 (SQUISH_DEFAULT_COMPILER) @@ -33,7 +23,7 @@ - QtVersion.3 + QtVersion.2 13 Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER) @@ -43,7 +33,7 @@ - QtVersion.4 + QtVersion.3 15 Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER) diff --git a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml index b88210ec3e..8baf4c029a 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml @@ -4,34 +4,6 @@ Profile.0 - - false - - - - {2f8a1f59-ddd7-49f0-ae61-1337223f56a3} - Desktop Device - Desktop - - - ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce} - - {41d0a157-7cf1-4c83-bab8-d77b3f136b85} - ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce} - - - 8 - - :///DESKTOP/// - {897290fe-c35a-4e5e-b5e2-d8e448e2aed1} - - Desktop 474 GCC - false - - - - - Profile.1 false @@ -42,10 +14,10 @@ Desktop - ProjectExplorer.ToolChain.Msvc:{1186dad9-c485-4f69-b7e1-aff54c89ecb2} + {7ca0887f-a9a5-4251-aba6-560a15595d20} - {93e707bd-236f-4d8d-917d-814aa358024b} - ProjectExplorer.ToolChain.Msvc:{1186dad9-c485-4f69-b7e1-aff54c89ecb2} + {d35e7a1a-5ab8-4fd6-8a2c-634846c669bb} + {7ca0887f-a9a5-4251-aba6-560a15595d20} 2 @@ -53,13 +25,13 @@ :///DESKTOP/// {9b35bbe6-25a7-4cce-ba07-487c795f5265} - Desktop 480 MSVC2010 + Desktop 487 default false - Profile.2 + Profile.1 false @@ -87,7 +59,7 @@ - Profile.3 + Profile.2 false @@ -115,7 +87,7 @@ - Profile.4 + Profile.3 false @@ -144,7 +116,7 @@ Profile.Count - 5 + 4 Profile.Default diff --git a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml index 73d1c52694..713c9acea6 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml @@ -6,24 +6,14 @@ QtVersion.0 2 - Qt 4.8 for Desktop - MSVC2010 (Qt SDK) - C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/bin/qmake.exe + Qt 4.8 for Desktop - MSVC2013 + C:/Qt/Qt4.8.7/bin/qmake.exe Qt4ProjectManager.QtVersion.Desktop false QtVersion.1 - - 8 - Qt 4.7.4 for Desktop - MinGW 4.4 (Qt SDK) - c:/qtsdk/desktop/qt/4.7.4/mingw/bin/qmake.exe - Qt4ProjectManager.QtVersion.Desktop - false - - - - QtVersion.2 20 Qt 5.3.1 (msvc2010_opengl) @@ -33,7 +23,7 @@ - QtVersion.3 + QtVersion.2 22 Qt %{Qt:Version} (mingw491_32) @@ -43,7 +33,7 @@ - QtVersion.4 + QtVersion.3 24 Qt %{Qt:Version} (msvc2013) diff --git a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml index bbb2ad2a90..0db49a0028 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml @@ -4,21 +4,6 @@ ToolChain.0 - - C:/QtSDK/mingw/bin/g++.exe - - - - x86-windows-msys-pe-32bit - - x86-windows-msys-pe-32bit - false - MinGW 4.4 - ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce} - - - - ToolChain.1 x86-windows-msvc2010-pe-32bit c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat @@ -29,7 +14,7 @@ - ToolChain.2 + ToolChain.1 C:/Qt/Qt5.4.1/Tools/mingw491_32/bin/g++.exe @@ -44,7 +29,7 @@ - ToolChain.3 + ToolChain.2 x86-windows-msvc2010-pe-32bit C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat @@ -56,7 +41,7 @@ - ToolChain.4 + ToolChain.3 x86-windows-msvc2013-pe-32bit C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat @@ -68,24 +53,7 @@ - ToolChain.5 - - mingw32 - C:/QtSDK/mingw/bin/gcc.exe - - - - x86-windows-msys-pe-32bit - - x86-windows-msys-pe-32bit - false - MinGW 4.4 - ProjectExplorer.ToolChain.Mingw:{41d0a157-7cf1-4c83-bab8-d77b3f136b85} - 1 - - - - ToolChain.6 + ToolChain.4 i686-w64-mingw32 C:/Qt/Qt5.4.1/Tools/mingw491_32/bin/gcc.exe @@ -102,7 +70,7 @@ - ToolChain.7 + ToolChain.5 x86-windows-msvc2013-pe-32bit C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat @@ -114,7 +82,7 @@ ToolChain.Count - 8 + 6 Version diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index 0cc851960b..47c6012c9f 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -28,10 +28,9 @@ import operator # for easier re-usage (because Python hasn't an enum type) class Targets: - ALL_TARGETS = tuple(map(lambda x: 2 ** x , range(6))) + ALL_TARGETS = tuple(map(lambda x: 2 ** x , range(5))) - (DESKTOP_474_GCC, - DESKTOP_480_DEFAULT, + (DESKTOP_487_DEFAULT, EMBEDDED_LINUX, DESKTOP_531_DEFAULT, DESKTOP_541_GCC, @@ -55,18 +54,12 @@ class Targets: @staticmethod def qt4Classes(): - return (Targets.DESKTOP_474_GCC | Targets.DESKTOP_480_DEFAULT - | Targets.EMBEDDED_LINUX) + return (Targets.DESKTOP_487_DEFAULT | Targets.EMBEDDED_LINUX) @staticmethod def getStringForTarget(target): - if target == Targets.DESKTOP_474_GCC: - return "Desktop 474 GCC" - elif target == Targets.DESKTOP_480_DEFAULT: - if platform.system() in ('Windows', 'Microsoft'): - return "Desktop 480 MSVC2010" - else: - return "Desktop 480 GCC" + if target == Targets.DESKTOP_487_DEFAULT: + return "Desktop 487 default" elif target == Targets.EMBEDDED_LINUX: return "Embedded Linux" elif target == Targets.DESKTOP_531_DEFAULT: diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index 49a83b1ca2..301ff108de 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -253,16 +253,3 @@ def verifyBreakPoint(bpToVerify): else: test.fatal("Expected a dict for bpToVerify - got '%s'" % className(bpToVerify)) return False - -# this function removes the compiled qml-debug library from QtSDK (only necessary for Qt < 4.8) -def removeQmlDebugFolderIfExists(): - paths = [os.path.join(sdkPath, "Desktop", "Qt", "474", "gcc", "qtc-qmldbg"), - os.path.join(sdkPath, "Desktop", "Qt", "4.7.4", "mingw", "qtc-qmldbg"), - os.path.join(sdkPath, "Desktop", "Qt", "4.7.4", "msvc2008", "qtc-qmldbg") - ] - for path in paths: - if os.path.exists(path): - try: - shutil.rmtree(path) - except: - test.warning("Error while removing '%s'" % path) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index d3f47b73e5..00135f668b 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -73,7 +73,7 @@ def openCmakeProject(projectPath, buildDir): invokeMenuItem("File", "Open File or Project...") selectFromFileDialog(projectPath) __chooseTargets__([]) # uncheck all - __chooseTargets__([Targets.DESKTOP_480_DEFAULT], additionalFunc=additionalFunction) + __chooseTargets__([Targets.DESKTOP_487_DEFAULT], additionalFunc=additionalFunction) clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton")) return True @@ -205,7 +205,7 @@ def __modifyAvailableTargets__(available, requiredQt, asStrings=False): # so the least required version is 4.8, but 4.7.4 will be still listed if not (requiredQtVersion == "480" and found.group(0) == "474"): available.remove(currentItem) - if requiredQtVersion > "480": + if requiredQtVersion > "487": toBeRemoved = [Targets.EMBEDDED_LINUX] if asStrings: toBeRemoved = Targets.getTargetsAsStrings(toBeRemoved) @@ -349,7 +349,7 @@ def createEmptyQtProject(workingDir=None, projectName=None, targets=Targets.desk __createProjectHandleLastPage__() return projectName, checkedTargets -def createNewNonQtProject(workingDir=None, projectName=None, target=[Targets.DESKTOP_474_GCC], +def createNewNonQtProject(workingDir=None, projectName=None, target=[Targets.DESKTOP_487_DEFAULT], plainC=False, cmake=False, qbs=False): if plainC: template = "Plain C Application" @@ -378,7 +378,7 @@ def createNewNonQtProject(workingDir=None, projectName=None, target=[Targets.DES return projectName def createNewCPPLib(projectDir = None, projectName = None, className = None, fromWelcome = False, - target = [Targets.DESKTOP_474_GCC], isStatic = False, modules = ["QtCore"]): + target = [Targets.DESKTOP_487_DEFAULT], isStatic = False, modules = ["QtCore"]): available = __createProjectOrFileSelectType__(" Library", "C++ Library", fromWelcome, True) if isStatic: libType = LibType.STATIC @@ -396,7 +396,7 @@ def createNewCPPLib(projectDir = None, projectName = None, className = None, fro return checkedTargets, projectName, className def createNewQtPlugin(projectDir=None, projectName=None, className=None, fromWelcome=False, - target=[Targets.DESKTOP_474_GCC], baseClass="QGenericPlugin"): + target=[Targets.DESKTOP_487_DEFAULT], baseClass="QGenericPlugin"): available = __createProjectOrFileSelectType__(" Library", "C++ Library", fromWelcome, True) if projectDir == None: projectDir = tempDir() @@ -414,7 +414,7 @@ def createNewQtPlugin(projectDir=None, projectName=None, className=None, fromWel # parameter additionalFunc function to be executed inside the detailed view of each chosen kit # if present, 'Details' button will be clicked, function will be executed, # 'Details' button will be clicked again -def __chooseTargets__(targets=[Targets.DESKTOP_474_GCC], availableTargets=None, additionalFunc=None): +def __chooseTargets__(targets=[Targets.DESKTOP_487_DEFAULT], availableTargets=None, additionalFunc=None): if availableTargets != None: available = availableTargets else: @@ -653,8 +653,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): result = [] if 'Desktop' in supports: if version == None or version < "5.0": - result.append(Targets.DESKTOP_474_GCC) - result.append(Targets.DESKTOP_480_DEFAULT) + result.append(Targets.DESKTOP_487_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.append(Targets.EMBEDDED_LINUX) result.extend([Targets.DESKTOP_531_DEFAULT, Targets.DESKTOP_561_DEFAULT]) diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 71efd63f42..2599a33581 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -308,16 +308,18 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]): # current dir is directory holding qtcreator.py origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings")) -sdkPath = os.path.expanduser("~/QtSDK") +qt4Path = os.path.expanduser("~/Qt4.8.7") if platform.system() in ('Windows', 'Microsoft'): - sdkPath = "C:\\QtSDK" + qt4Path = "C:\\Qt\\Qt4.8.7" origSettingsDir = os.path.join(origSettingsDir, "windows") elif platform.system() == 'Darwin': origSettingsDir = os.path.join(origSettingsDir, "mac") else: origSettingsDir = os.path.join(origSettingsDir, "unix") -srcPath = os.getenv("SYSTEST_SRCPATH", os.path.join(sdkPath, "src")) + +qt4examplePath = os.path.join(qt4Path, "examples") +srcPath = os.getenv("SYSTEST_SRCPATH", os.path.expanduser(os.path.join("~", "squish-data"))) overrideStartApplication() diff --git a/tests/system/suite_APTW/tst_APTW03/test.py b/tests/system/suite_APTW/tst_APTW03/test.py index 1b8090fcdc..d1ef6a5f80 100644 --- a/tests/system/suite_APTW/tst_APTW03/test.py +++ b/tests/system/suite_APTW/tst_APTW03/test.py @@ -81,14 +81,13 @@ def main(): # Qt Plugin needs Qt4.8 for QGenericPlugin which is tested by default targets = Targets.desktopTargetClasses() - targets.remove(Targets.DESKTOP_474_GCC) checkedTargets, projectName, className = createNewQtPlugin(tempDir(), "SampleApp3", "MyPlugin", target=targets) virtualFunctionsAdded = False for kit, config in iterateBuildConfigs(len(checkedTargets), "Debug"): - is480Kit = "480" in Targets.getStringForTarget(checkedTargets[kit]) + is487Kit = "487" in Targets.getStringForTarget(checkedTargets[kit]) verifyBuildConfig(len(checkedTargets), kit, config, True, True) - if virtualFunctionsAdded and platform.system() in ('Microsoft', 'Windows') and is480Kit: + if virtualFunctionsAdded and platform.system() in ('Microsoft', 'Windows') and is487Kit: test.warning("Skipping building of Qt4.8 targets because of QTCREATORBUG-12251.") continue invokeMenuItem('Build', 'Build Project "%s"' % projectName) @@ -126,12 +125,12 @@ def main(): addReturn(editor, "QObject \*%s::create.*" % className, "0") virtualFunctionsAdded = True invokeMenuItem('File', 'Save All') - if platform.system() in ('Microsoft', 'Windows') and is480Kit: # QTCREATORBUG-12251 + if platform.system() in ('Microsoft', 'Windows') and is487Kit: # QTCREATORBUG-12251 test.warning("Skipping building of Qt4.8 targets because of QTCREATORBUG-12251.") continue invokeMenuItem('Build', 'Rebuild Project "%s"' % projectName) waitForCompile(10000) - if platform.system() == "Darwin" and is480Kit: + if platform.system() == "Darwin" and is487Kit: test.log("Skipping compile check (gcc on OSX is only clang with gcc frontend nowadays)") continue checkCompile() diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py index 99d1d33f76..8e336c8567 100755 --- a/tests/system/suite_CCOM/tst_CCOM01/test.py +++ b/tests/system/suite_CCOM/tst_CCOM01/test.py @@ -41,8 +41,7 @@ def main(): return # open example project, supports only Qt 5 targets = Targets.desktopTargetClasses() - targets.remove(Targets.DESKTOP_474_GCC) - targets.remove(Targets.DESKTOP_480_DEFAULT) + targets.remove(Targets.DESKTOP_487_DEFAULT) checkedTargets = openQmakeProject(examplePath, targets) # build and wait until finished - on all build configurations availableConfigs = iterateBuildConfigs(len(checkedTargets)) diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py index d9cf3c84f5..482a616f6d 100644 --- a/tests/system/suite_CSUP/tst_CSUP04/test.py +++ b/tests/system/suite_CSUP/tst_CSUP04/test.py @@ -28,8 +28,8 @@ source("../../shared/qtcreator.py") # entry of test def main(): # prepare example project - sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") - proFile = "propertyanimation.pro" + sourceExample = os.path.abspath(qt4examplePath + "/declarative/animation/basics/property-animation") + proFile = "property-animation.pro" if not neededFilePresent(os.path.join(sourceExample, proFile)): return # copy example project to temp directory @@ -44,7 +44,7 @@ def main(): progressBarWait(30000) checkCodeModelSettings(useClang) # open .cpp file in editor - if not openDocument("propertyanimation.Sources.main\\.cpp"): + if not openDocument("property-animation.Sources.main\\.cpp"): test.fatal("Could not open main.cpp") invokeMenuItem("File", "Exit") return @@ -58,12 +58,12 @@ def main(): return # wait until search finished and verify search results waitForSearchResults() - validateSearchResult(14) + validateSearchResult(21) result = re.search("QmlApplicationViewer", str(editorWidget.plainText)) test.verify(result, "Verifying if: The list of all usages of the selected text is displayed in Search Results. " "File with used text is opened.") # move cursor to the other word and test Find Usages function by pressing Ctrl+Shift+U. - openDocument("propertyanimation.Sources.main\\.cpp") + openDocument("property-animation.Sources.main\\.cpp") if not placeCursorToLine(editorWidget, "viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);"): return for i in range(4): diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index 54f8e4b783..3b9409c56c 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -28,8 +28,8 @@ source("../../shared/qtcreator.py") # entry of test def main(): # prepare example project - sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/animation/basics/property-animation") - proFile = "propertyanimation.pro" + sourceExample = os.path.abspath(qt4examplePath + "/declarative/animation/basics/property-animation") + proFile = "property-animation.pro" if not neededFilePresent(os.path.join(sourceExample, proFile)): return # copy example project to temp directory @@ -44,7 +44,7 @@ def main(): progressBarWait(30000) checkCodeModelSettings(useClang) # open .cpp file in editor - if not openDocument("propertyanimation.Sources.main\\.cpp"): + if not openDocument("property-animation.Sources.main\\.cpp"): test.fatal("Could not open main.cpp") invokeMenuItem("File", "Exit") return diff --git a/tests/system/suite_HELP/tst_HELP04/test.py b/tests/system/suite_HELP/tst_HELP04/test.py index 7f046e76a4..344d3e20e4 100755 --- a/tests/system/suite_HELP/tst_HELP04/test.py +++ b/tests/system/suite_HELP/tst_HELP04/test.py @@ -28,8 +28,8 @@ import re # test search in help mode and advanced search searchKeywordDictionary={ "deployment":True, "deplmint":False, "build":True, "bld":False } -urlDictionary = { "deployment":"qthelp://com.trolltech.qt.481/qdoc/gettingstarted-develop.html", - "build":"qthelp://com.trolltech.qt.481/qdoc/sql-driver.html" } +urlDictionary = { "deployment":"qthelp://com.trolltech.qt.487/qdoc/gettingstarted-develop.html", + "build":"qthelp://com.trolltech.qt.487/qdoc/sql-driver.html" } def __getSelectedText__(): @@ -84,12 +84,11 @@ def verifyUrl(expected): return test.compare(expected, __getUrl__(), "Expected URL loaded?") def main(): - global sdkPath noMatch = "Your search did not match any documents." startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - addHelpDocumentation([os.path.join(sdkPath, "Documentation", "qt.qch")]) + addHelpDocumentation([os.path.join(qt4Path, "doc", "qch", "qt.qch")]) # switch to help mode switchViewTo(ViewConstants.HELP) # verify that search widget is accessible @@ -160,12 +159,12 @@ def main(): type(resultsView, "") type(resultsView, "") verifySelection("printing") - verifyUrl("qthelp://com.trolltech.qt.481/qdoc/overviews.html") + verifyUrl("qthelp://com.trolltech.qt.487/qdoc/overviews.html") for i in range(2): type(resultsView, "") type(resultsView, "") verifySelection("sql") - verifyUrl("qthelp://com.trolltech.qt.481/qdoc/best-practices.html") + verifyUrl("qthelp://com.trolltech.qt.487/qdoc/best-practices.html") # verify if simple search is properly disabled test.verify(not searchLineEdit.enabled, "Verifying if simple search is not active in advanced mode.") diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index f8ed64a3b2..89c5fe3091 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -167,9 +167,3 @@ def safeClickTab(tab): pass test.fatal("Tab %s is not being shown." % tab) return False - -def init(): - removeQmlDebugFolderIfExists() - -def cleanup(): - removeQmlDebugFolderIfExists() diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index f20069cd2a..54b0d652ee 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -31,7 +31,6 @@ def main(): return # Requires Qt 4.8 targets = Targets.desktopTargetClasses() - targets.remove(Targets.DESKTOP_474_GCC) # using a temporary directory won't mess up a potentially existing workingDir = tempDir() checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targets) @@ -94,9 +93,3 @@ def main(): else: test.fatal("Setting breakpoints failed - leaving without testing.") invokeMenuItem("File", "Exit") - -def init(): - removeQmlDebugFolderIfExists() - -def cleanup(): - removeQmlDebugFolderIfExists() diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py index d66524001c..34be2beafa 100644 --- a/tests/system/suite_general/tst_build_speedcrunch/test.py +++ b/tests/system/suite_general/tst_build_speedcrunch/test.py @@ -42,7 +42,7 @@ def main(): startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - checkedTargets = openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_480_DEFAULT]) + checkedTargets = openQmakeProject(SpeedCrunchPath, [Targets.DESKTOP_487_DEFAULT]) progressBarWait(30000) fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py index 8fe0b03847..aa4a73d78f 100644 --- a/tests/system/suite_general/tst_openqt_creator/test.py +++ b/tests/system/suite_general/tst_openqt_creator/test.py @@ -36,7 +36,7 @@ def main(): return runButton = findObject(':*Qt Creator.Run_Core::Internal::FancyToolButton') - openQmakeProject(pathSpeedcrunch, [Targets.DESKTOP_480_DEFAULT]) + openQmakeProject(pathSpeedcrunch, [Targets.DESKTOP_487_DEFAULT]) # Wait for parsing to complete waitFor("runButton.enabled", 30000) # Starting before opening, because this is where Creator froze (QTCREATORBUG-10733) diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py index 03a9114263..4e626232af 100644 --- a/tests/system/suite_general/tst_session_handling/test.py +++ b/tests/system/suite_general/tst_session_handling/test.py @@ -148,6 +148,3 @@ def checkForSessionFile(sessionName, proFiles): proFile = proFile.replace('\\', '/') test.verify(proFile in content, "Verifying whether expected .pro file (%s) is listed " "inside session file." % proFile) - -def init(): - removeQmlDebugFolderIfExists() -- cgit v1.2.1