summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@digia.com>2013-01-18 16:31:48 +0100
committerRobert Loehning <robert.loehning@digia.com>2013-01-23 12:06:26 +0100
commit3f570a79019294d884e363d2c8ef763ab373afd8 (patch)
treecaf8a8b89d6f34f51c8465731b680603f81c34ee
parent1f80a41ffc07fadbe19ee6f642e25301352685c1 (diff)
downloadqt-creator-3f570a79019294d884e363d2c8ef763ab373afd8.tar.gz
Squish: Enable testing with MSVC again
Change-Id: Ib6051caa6e3a52a611aa24c0bf0c4d89939fdd58 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r--tests/system/objects.map2
-rw-r--r--tests/system/shared/classes.py7
-rw-r--r--tests/system/shared/debugger.py28
-rw-r--r--tests/system/shared/project.py27
-rwxr-xr-xtests/system/suite_APTW/shared/aptw.py6
-rw-r--r--tests/system/suite_APTW/tst_APTW01/test.py4
-rw-r--r--tests/system/suite_APTW/tst_APTW02/test.py4
-rwxr-xr-xtests/system/suite_CCOM/tst_CCOM01/test.py6
-rw-r--r--tests/system/suite_SCOM/tst_SCOM01/test.py6
-rw-r--r--tests/system/suite_SCOM/tst_SCOM04/test.py6
-rw-r--r--tests/system/suite_debugger/tst_build_new_project/test.py6
-rw-r--r--tests/system/suite_debugger/tst_cli_output_console/test.py15
-rw-r--r--tests/system/suite_debugger/tst_simple_debug/test.py16
-rw-r--r--tests/system/suite_general/tst_build_speedcrunch/test.py6
-rw-r--r--tests/system/suite_qtquick/tst_qtquick_creation/test.py3
-rw-r--r--tests/system/suite_qtquick/tst_qtquick_creation2/test.py4
16 files changed, 94 insertions, 52 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map
index 2ee61a9e84..2e50fd33c8 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -85,6 +85,7 @@
:Qt Creator.Search for:_QLabel {text='Search for:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FilterLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
+:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton {occurrence='3' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Bookmarks_TreeView {type='TreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CloseButton {type='CloseButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -128,6 +129,7 @@
:headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:popupFrame_Proposal_QListView {container=':popupFrame_TextEditor::GenericProposalWidget' type='QListView' unnamed='1' visible='1'}
:popupFrame_TextEditor::GenericProposalWidget {name='m_popupFrame' type='TextEditor::GenericProposalWidget' visible='1'}
+:qmakeCallEdit {container=':Qt Creator.scrollArea_QScrollArea' text?='<b>qmake:</b> qmake*' type='QLabel' unnamed='1' visible='1'}
:qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Core__Internal__GeneralSettings' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='CppTools__Internal__CompletionSettingsPage' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.Form_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Help__Internal__GeneralSettingsPage' type='QWidget' visible='1' windowTitle='Form'}
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index bbe800d0ee..96b1cc137e 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -14,6 +14,13 @@ class QtQuickConstants:
DESKTOP_474_MSVC2008 = 32
@staticmethod
+ def desktopTargetClasses():
+ desktopTargets = QtQuickConstants.Targets.DESKTOP_474_GCC
+ if platform.system() in ('Windows', 'Microsoft'):
+ desktopTargets |= QtQuickConstants.Targets.DESKTOP_474_MSVC2008
+ return desktopTargets
+
+ @staticmethod
def getStringForComponents(components):
if components==QtQuickConstants.Components.BUILTIN:
return "Built-in elements only (for all platforms)"
diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py
index fbb018aa62..9c5b14bab0 100644
--- a/tests/system/shared/debugger.py
+++ b/tests/system/shared/debugger.py
@@ -1,7 +1,7 @@
import re
-def handleDebuggerWarnings(config):
- if "MSVC" in config:
+def handleDebuggerWarnings(config, isMsvcBuild=False):
+ if isMsvcBuild:
try:
popup = waitForObject("{text?='<html><head/><body>*' type='QLabel' unnamed='1' visible='1' window=':Symbol Server_Utils::CheckableMessageBox'}", 10000)
symServerNotConfiged = ("<html><head/><body><p>The debugger is not configured to use the public "
@@ -99,16 +99,19 @@ def removeOldBreakpoints():
return test.compare(model.rowCount(), 0, "Check if all breakpoints have been removed.")
# function to do simple debugging of the current (configured) project
+# param kitCount specifies the number of kits currently defined (must be correct!)
+# param currentKit specifies the target to use (zero based index)
+# param currentConfigName is the name of the configuration that should be used
# param pressContinueCount defines how often it is expected to press
# the 'Continue' button while debugging
# param expectedBPOrder holds a list of dicts where the dicts contain always
# only 1 key:value pair - the key is the name of the file, the value is
# line number where the debugger should stop
-def doSimpleDebugging(currentConfigName, pressContinueCount=1, expectedBPOrder=[]):
+def doSimpleDebugging(kitCount, currentKit, currentConfigName, pressContinueCount=1, expectedBPOrder=[]):
expectedLabelTexts = ['Stopped\.', 'Stopped at breakpoint \d+ \(\d+\) in thread \d+\.']
if len(expectedBPOrder) == 0:
expectedLabelTexts.append("Running\.")
- if not __startDebugger__(currentConfigName):
+ if not __startDebugger__(kitCount, currentKit, currentConfigName):
return False
statusLabel = findObject(":Debugger Toolbar.StatusText_Utils::StatusLabel")
test.log("Continuing debugging %d times..." % pressContinueCount)
@@ -139,9 +142,22 @@ def doSimpleDebugging(currentConfigName, pressContinueCount=1, expectedBPOrder=[
# if stopping failed - debugger had already stopped
return True
-def __startDebugger__(config):
+# param kitCount specifies the number of kits currently defined (must be correct!)
+# param currentKit specifies the target to use (zero based index)
+def isMsvcConfig(kitCount, currentKit):
+ switchViewTo(ViewConstants.PROJECTS)
+ switchToBuildOrRunSettingsFor(kitCount, currentKit, ProjectSettings.BUILD)
+ isMsvc = " -spec win32-msvc" in str(waitForObject(":qmakeCallEdit").text)
+ switchViewTo(ViewConstants.EDIT)
+ return isMsvc
+
+# param kitCount specifies the number of kits currently defined (must be correct!)
+# param currentKit specifies the target to use (zero based index)
+# param config is the name of the configuration that should be used
+def __startDebugger__(kitCount, currentKit, config):
+ isMsvcBuild = isMsvcConfig(kitCount, currentKit)
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
- handleDebuggerWarnings(config)
+ handleDebuggerWarnings(config, isMsvcBuild)
hasNotTimedOut = waitFor("object.exists(':Debugger Toolbar.Continue_QToolButton')", 60000)
try:
mBox = findObject(":Failed to start application_QMessageBox")
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index f2980d9b27..085a1425c5 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -12,7 +12,7 @@ def __handleProcessExited__(object, exitCode):
global processExited
processExited = True
-def openQmakeProject(projectPath, targets = QtQuickConstants.Targets.DESKTOP_474_GCC, fromWelcome = False):
+def openQmakeProject(projectPath, targets=QtQuickConstants.desktopTargetClasses(), fromWelcome=False):
cleanUpUserFiles(projectPath)
if fromWelcome:
mouseClick(waitForObject(":OpenProject_QStyleItem"), 5, 5, 0, Qt.LeftButton)
@@ -29,10 +29,11 @@ def openQmakeProject(projectPath, targets = QtQuickConstants.Targets.DESKTOP_474
clickButton(waitForObject("{text='Yes' type='QPushButton' unnamed='1' visible='1'}"))
except:
pass
- __chooseTargets__(targets)
+ checkedTargets = __chooseTargets__(targets)
configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'"
"window=':Qt Creator_Core::Internal::MainWindow'}")
clickButton(configureButton)
+ return checkedTargets
def openCmakeProject(projectPath, buildDir):
invokeMenuItem("File", "Open File or Project...")
@@ -110,13 +111,14 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
# param checks turns tests in the function on if set to True
# param available a list holding the available targets
def __selectQtVersionDesktop__(checks, available=None):
- __chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
+ checkedTargets = __chooseTargets__(QtQuickConstants.desktopTargetClasses(), available)
if checks:
cbObject = ("{type='QCheckBox' text='%s' unnamed='1' visible='1' "
"container={type='Utils::DetailsWidget' visible='1' unnamed='1'}}")
verifyChecked(cbObject % "Debug")
verifyChecked(cbObject % "Release")
clickButton(waitForObject(":Next_QPushButton"))
+ return checkedTargets
def __createProjectHandleLastPage__(expectedFiles = None):
if expectedFiles != None:
@@ -144,7 +146,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
template = "Qt Gui Application"
available = __createProjectOrFileSelectType__(" Applications", template)
__createProjectSetNameAndPath__(path, projectName, checks)
- __selectQtVersionDesktop__(checks, available)
+ checkedTargets = __selectQtVersionDesktop__(checks, available)
if checks:
exp_filename = "mainwindow"
@@ -174,6 +176,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)
__verifyFileCreation__(path, expectedFiles)
+ return checkedTargets
# Creates a Qt Console project
# param path specifies where to create the project
@@ -182,7 +185,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
def createProject_Qt_Console(path, projectName, checks = True):
available = __createProjectOrFileSelectType__(" Applications", "Qt Console Application")
__createProjectSetNameAndPath__(path, projectName, checks)
- __selectQtVersionDesktop__(checks, available)
+ checkedTargets = __selectQtVersionDesktop__(checks, available)
expectedFiles = None
if checks:
@@ -197,9 +200,10 @@ def createProject_Qt_Console(path, projectName, checks = True):
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000)
__verifyFileCreation__(path, expectedFiles)
+ return checkedTargets
def createNewQtQuickApplication(workingDir, projectName = None, templateFile = None,
- targets = QtQuickConstants.Targets.DESKTOP_474_GCC, qtQuickVersion=1,
+ targets=QtQuickConstants.desktopTargetClasses(), qtQuickVersion=1,
fromWelcome=False):
if templateFile:
if qtQuickVersion == 2:
@@ -215,12 +219,12 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
type(baseLineEd, templateFile)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
- __chooseTargets__(targets, available)
+ checkedTargets = __chooseTargets__(targets, available)
snooze(1)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
__createProjectHandleLastPage__()
- return projectName
+ return checkedTargets, projectName
def createNewQtQuickUI(workingDir):
__createProjectOrFileSelectType__(" Applications", "Qt Quick 1 UI")
@@ -235,7 +239,7 @@ def createNewQmlExtension(workingDir):
if workingDir == None:
workingDir = tempDir()
__createProjectSetNameAndPath__(workingDir)
- __chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
+ checkedTargets = __chooseTargets__(QtQuickConstants.Targets.DESKTOP_474_GCC, available)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
nameLineEd = waitForObject("{buddy={type='QLabel' text='Object Class-name:' unnamed='1' visible='1'} "
@@ -246,6 +250,7 @@ def createNewQmlExtension(workingDir):
replaceEditorContent(uriLineEd, "org.qt-project.test.qmlcomponents")
clickButton(nextButton)
__createProjectHandleLastPage__()
+ return checkedTargets
# parameter components can only be one of the Constants defined in QtQuickConstants.Components
def __chooseComponents__(components=QtQuickConstants.Components.BUILTIN):
@@ -272,11 +277,14 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP_474_GCC, availabl
if platform.system() in ('Windows', 'Microsoft'):
available.remove(QtQuickConstants.Targets.EMBEDDED_LINUX)
available.append(QtQuickConstants.Targets.DESKTOP_474_MSVC2008)
+ checkedTargets = []
for current in available:
mustCheck = targets & current == current
try:
ensureChecked("{type='QCheckBox' text='%s' visible='1'}" % QtQuickConstants.getStringForTarget(current),
mustCheck, 3000)
+ if (mustCheck):
+ checkedTargets.append(current)
except LookupError:
if mustCheck:
test.fail("Failed to check target '%s'." % QtQuickConstants.getStringForTarget(current))
@@ -284,6 +292,7 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP_474_GCC, availabl
# Simulator has been added without knowing whether configured or not - so skip warning here?
if current != QtQuickConstants.Targets.SIMULATOR:
test.warning("Target '%s' is not set up correctly." % QtQuickConstants.getStringForTarget(current))
+ return checkedTargets
# run and close an application
# withHookInto - if set to True the function tries to attach to the sub-process instead of simply pressing Stop inside Creator
diff --git a/tests/system/suite_APTW/shared/aptw.py b/tests/system/suite_APTW/shared/aptw.py
index 94497fcac4..24fe16ec6e 100755
--- a/tests/system/suite_APTW/shared/aptw.py
+++ b/tests/system/suite_APTW/shared/aptw.py
@@ -14,15 +14,15 @@ def verifyBuildAndRun():
"Verifying if built app started and closed successfully.")
# run project for debug and release
-def runVerify():
- availableConfigs = iterateBuildConfigs(1)
+def runVerify(checkedTargets):
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found build configurations, quitting")
invokeMenuItem("File", "Save All")
invokeMenuItem("File", "Exit")
# select debug configuration
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
test.log("Using build config '%s'" % config)
runAndCloseApp()
verifyBuildAndRun()
diff --git a/tests/system/suite_APTW/tst_APTW01/test.py b/tests/system/suite_APTW/tst_APTW01/test.py
index 9b6dc46ad9..0b83ffe7bf 100644
--- a/tests/system/suite_APTW/tst_APTW01/test.py
+++ b/tests/system/suite_APTW/tst_APTW01/test.py
@@ -5,8 +5,8 @@ source("../shared/aptw.py")
# test New Qt Gui Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
- createProject_Qt_GUI(tempDir(), "SampleApp")
+ checkedTargets = createProject_Qt_GUI(tempDir(), "SampleApp")
# run project for debug and release and verify results
- runVerify()
+ runVerify(checkedTargets)
#close Qt Creator
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_APTW/tst_APTW02/test.py b/tests/system/suite_APTW/tst_APTW02/test.py
index f71de88cac..2011b4c6a5 100644
--- a/tests/system/suite_APTW/tst_APTW02/test.py
+++ b/tests/system/suite_APTW/tst_APTW02/test.py
@@ -5,9 +5,9 @@ source("../shared/aptw.py")
# test New Qt Quick Application build and run for release and debug option
def main():
startApplication("qtcreator" + SettingsPath)
- createNewQtQuickApplication(tempDir(), "SampleApp")
+ checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
# run project for debug and release and verify results
- runVerify()
+ runVerify(checkedTargets)
#close Qt Creator
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_CCOM/tst_CCOM01/test.py b/tests/system/suite_CCOM/tst_CCOM01/test.py
index 1968b5d721..4c68038b97 100755
--- a/tests/system/suite_CCOM/tst_CCOM01/test.py
+++ b/tests/system/suite_CCOM/tst_CCOM01/test.py
@@ -13,13 +13,13 @@ def main():
examplePath = os.path.join(templateDir, proFile)
startApplication("qtcreator" + SettingsPath)
# open example project
- openQmakeProject(examplePath)
+ checkedTargets = openQmakeProject(examplePath)
# build and wait until finished - on all build configurations
- availableConfigs = iterateBuildConfigs(1)
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
# try to build project
test.log("Testing build configuration: " + config)
invokeMenuItem("Build", "Build All")
diff --git a/tests/system/suite_SCOM/tst_SCOM01/test.py b/tests/system/suite_SCOM/tst_SCOM01/test.py
index 94871997a1..75b33d92d6 100644
--- a/tests/system/suite_SCOM/tst_SCOM01/test.py
+++ b/tests/system/suite_SCOM/tst_SCOM01/test.py
@@ -5,13 +5,13 @@ source("../../shared/suites_qtta.py")
def main():
startApplication("qtcreator" + SettingsPath)
# create qt quick application
- createNewQtQuickApplication(tempDir(), "SampleApp")
+ checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
# build it - on all build configurations
- availableConfigs = iterateBuildConfigs(1)
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
diff --git a/tests/system/suite_SCOM/tst_SCOM04/test.py b/tests/system/suite_SCOM/tst_SCOM04/test.py
index da81053eaa..254fea1060 100644
--- a/tests/system/suite_SCOM/tst_SCOM04/test.py
+++ b/tests/system/suite_SCOM/tst_SCOM04/test.py
@@ -8,7 +8,7 @@ def main():
"'SyntaxError' : undeclared identifier"]
startApplication("qtcreator" + SettingsPath)
# create qt quick application
- createNewQtQuickApplication(tempDir(), "SampleApp")
+ checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp")
# create syntax error in cpp file
doubleClickItem(":Qt Creator_Utils::NavigationTreeView", "SampleApp.Sources.main\\.cpp", 5, 5, 0, Qt.LeftButton)
if not appendToLine(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget"), "viewer.showExpanded();", "SyntaxError"):
@@ -17,11 +17,11 @@ def main():
# save all
invokeMenuItem("File", "Save All")
# build it - on all build configurations
- availableConfigs = iterateBuildConfigs(1)
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
# try to compile
test.log("Testing build configuration: " + config)
clickButton(waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton"))
diff --git a/tests/system/suite_debugger/tst_build_new_project/test.py b/tests/system/suite_debugger/tst_build_new_project/test.py
index db6771c9f2..27e532859a 100644
--- a/tests/system/suite_debugger/tst_build_new_project/test.py
+++ b/tests/system/suite_debugger/tst_build_new_project/test.py
@@ -4,12 +4,12 @@ project = "SquishProject"
def main():
startApplication("qtcreator" + SettingsPath)
- createProject_Qt_Console(tempDir(), project)
- availableConfigs = iterateBuildConfigs(1)
+ checkedTargets = createProject_Qt_Console(tempDir(), project)
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
test.log("Testing build configuration: " + config)
runAndCloseApp()
invokeMenuItem("File", "Exit")
diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py
index c1576de2f0..e4cbc23ceb 100644
--- a/tests/system/suite_debugger/tst_cli_output_console/test.py
+++ b/tests/system/suite_debugger/tst_cli_output_console/test.py
@@ -17,7 +17,7 @@ def main():
startApplication("qtcreator" + SettingsPath)
installLazySignalHandler("{type='ProjectExplorer::Internal::ProjectExplorerPlugin' unnamed='1'}",
"runControlFinished(ProjectExplorer::RunControl*)", "__handlerunControlFinished__")
- createProject_Qt_Console(tempDir(), project)
+ checkedTargets = createProject_Qt_Console(tempDir(), project)
mainEditor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
replaceEditorContent(mainEditor, "")
@@ -33,16 +33,16 @@ def main():
selectFromLocator(project + ".pro")
proEditor = waitForObject(":Qt Creator_ProFileEditorWidget")
test.verify("CONFIG += console" in str(proEditor.plainText), "Verifying that program is configured with console")
- setRunInTerminal(1, 0, False)
- availableConfigs = iterateBuildConfigs(1)
+ availableConfigs = iterateBuildConfigs(len(checkedTargets))
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
test.log("Testing build configuration: " + config)
test.log("Running application")
+ setRunInTerminal(len(checkedTargets), kit, False)
runControlFinished = False
clickButton(waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}"))
waitFor("runControlFinished==True", 20000)
@@ -55,16 +55,17 @@ def main():
clickButton(waitForObject(":Qt Creator_CloseButton"))
test.log("Debugging application")
+ isMsvc = isMsvcConfig(len(checkedTargets), kit)
runControlFinished = False
invokeMenuItem("Debug", "Start Debugging", "Start Debugging")
JIRA.performWorkaroundIfStillOpen(6853, JIRA.Bug.CREATOR, config)
- handleDebuggerWarnings(config)
+ handleDebuggerWarnings(config, isMsvc)
waitFor("runControlFinished==True", 20000)
if not runControlFinished:
test.warning("Waiting for runControlFinished timed out")
try:
debuggerLog = takeDebuggerLog()
- if not "MSVC" in config:
+ if not isMsvc:
# cout works with MSVC, too, but we don't check it since it's not supported
verifyOutput(debuggerLog, outputStdOut, "std::cout", "Debugger Log")
verifyOutput(debuggerLog, outputStdErr, "std::cerr", "Debugger Log")
@@ -79,7 +80,7 @@ def main():
test.fatal("Debugger log did not behave as expected. Please check manually.")
switchViewTo(ViewConstants.EDIT)
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
- if not "MSVC" in config:
+ if not isMsvc:
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py
index 5d0a12490e..6f8231a844 100644
--- a/tests/system/suite_debugger/tst_simple_debug/test.py
+++ b/tests/system/suite_debugger/tst_simple_debug/test.py
@@ -5,13 +5,16 @@ workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
- if not checkDebuggingLibrary([QtQuickConstants.Targets.DESKTOP_474_GCC]):
+ targets = [QtQuickConstants.Targets.DESKTOP_474_GCC]
+ if platform.system() in ('Windows', 'Microsoft'):
+ targets.append(QtQuickConstants.Targets.DESKTOP_474_MSVC2008)
+ if not checkDebuggingLibrary(targets):
test.fatal("Error while checking debugging libraries - leaving this test.")
invokeMenuItem("File", "Exit")
return
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
- projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
+ checkedTargets, projectName = createNewQtQuickApplication(workingDir)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
"sourceFilesRefreshed(QStringList)")
@@ -33,13 +36,13 @@ def main():
if result:
expectedBreakpointsOrder = [{"main.cpp":9}, {"main.qml":13}]
# Only use 4.7.4 to work around QTBUG-25187
- availableConfigs = iterateBuildConfigs(1, "Debug")
+ availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug")
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Qt 4.7.4) - leaving without debugging.")
for kit, config in availableConfigs:
test.log("Selecting '%s' as build config" % config)
- selectBuildConfig(1, kit, config)
- verifyBuildConfig(1, kit, True, enableQmlDebug=True)
+ selectBuildConfig(len(checkedTargets), kit, config)
+ verifyBuildConfig(len(checkedTargets), kit, True, enableQmlDebug=True)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}",
@@ -48,7 +51,8 @@ def main():
test.fatal("Compile had errors... Skipping current build config")
continue
allowAppThroughWinFW(workingDir, projectName, False)
- if not doSimpleDebugging(config, 2, expectedBreakpointsOrder):
+ if not doSimpleDebugging(len(checkedTargets), kit, config,
+ 2, expectedBreakpointsOrder):
try:
stopB = findObject(':Qt Creator.Stop_QToolButton')
if stopB.enabled:
diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py
index 797541f5bb..470e9389c1 100644
--- a/tests/system/suite_general/tst_build_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_build_speedcrunch/test.py
@@ -15,16 +15,16 @@ def main():
if not neededFilePresent(SpeedCrunchPath):
return
startApplication("qtcreator" + SettingsPath)
- openQmakeProject(SpeedCrunchPath)
+ checkedTargets = openQmakeProject(SpeedCrunchPath)
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
- availableConfigs = iterateBuildConfigs(1, "Release")
+ availableConfigs = iterateBuildConfigs(len(checkedTargets), "Release")
if not availableConfigs:
test.fatal("Haven't found a suitable Qt version (need Release build) - leaving without building.")
for kit, config in availableConfigs:
- selectBuildConfig(1, kit, config)
+ selectBuildConfig(len(checkedTargets), kit, config)
buildConfig = buildConfigFromFancyToolButton(fancyToolButton)
if buildConfig != config:
test.fatal("Build configuration %s is selected instead of %s" % (buildConfig, config))
diff --git a/tests/system/suite_qtquick/tst_qtquick_creation/test.py b/tests/system/suite_qtquick/tst_qtquick_creation/test.py
index a2c28b1b87..03ad95954e 100644
--- a/tests/system/suite_qtquick/tst_qtquick_creation/test.py
+++ b/tests/system/suite_qtquick/tst_qtquick_creation/test.py
@@ -4,7 +4,8 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
- projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
+ checkedTargets, projectName = createNewQtQuickApplication(workingDir,
+ targets = QtQuickConstants.Targets.DESKTOP_474_GCC)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")
diff --git a/tests/system/suite_qtquick/tst_qtquick_creation2/test.py b/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
index f05ffc3f2b..529181611f 100644
--- a/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
+++ b/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
@@ -8,7 +8,9 @@ def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
- projectName = createNewQtQuickApplication(workingDir, None, os.path.join(prepareTemplate(sourceExample), qmlFile))
+ checkedTargets, projectName = createNewQtQuickApplication(workingDir, None,
+ os.path.join(prepareTemplate(sourceExample), qmlFile),
+ QtQuickConstants.Targets.DESKTOP_474_GCC)
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
test.log("Building project")