forked from qt-creator/qt-creator
Squish: More corrections due to change of default build system
Change-Id: Ia221e1e84784f5218d14258fcc24dcac900d60ad Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
|
:Add Bookmark_BookmarkDialog {name='BookmarkDialog' type='BookmarkDialog' visible='1' windowTitle='Add Bookmark'}
|
||||||
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
|
:Add to Version Control.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':Add to Version Control_QMessageBox'}
|
||||||
:Add to Version Control_QMessageBox {text~='Add the file.*to version control (.*)?' type='QMessageBox' unnamed='1' visible='1'}
|
:Add to Version Control_QMessageBox {text~='Add the file.*to version control (.*)?' type='QMessageBox' unnamed='1' visible='1'}
|
||||||
:Additional arguments:_QWidget {buddy=':Qt Creator.Additional arguments:_QLabel' type='QWidget' unnamed='1' visible='1'}
|
|
||||||
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':DebugModeWidget.Toolbar_QDockWidget' name='PerspectiveChooser' type='QComboBox' visible='1'}
|
:Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox {container=':DebugModeWidget.Toolbar_QDockWidget' name='PerspectiveChooser' type='QComboBox' visible='1'}
|
||||||
:Analyzer Toolbar.Clear_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
|
:Analyzer Toolbar.Clear_QToolButton {container=':DebugModeWidget.Toolbar_QDockWidget' toolTip='Discard data' type='QToolButton' unnamed='1' visible='1'}
|
||||||
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
|
:Analyzer Toolbar.Elapsed:_QLabel {container=':DebugModeWidget.Toolbar_QDockWidget' text~='Elapsed: \\\\d+.\\\\d s' type='QLabel' unnamed='1' visible='1'}
|
||||||
@@ -118,15 +117,12 @@
|
|||||||
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
|
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
|
||||||
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
|
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
|
||||||
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Additional arguments:_QLabel {text='Additional arguments:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
||||||
:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.DragDoc_QToolButton {toolTip='Drag to drag documents between splits' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.DragDoc_QToolButton {toolTip='Drag to drag documents between splits' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Effective qmake call:_QLabel {text='Effective qmake call:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.Effective qmake call:_QTextEdit {aboveWidget=':Additional arguments:_QWidget' leftWidget=':Qt Creator.Effective qmake call:_QLabel' type='QTextEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
||||||
|
@@ -163,13 +163,17 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT):
|
|||||||
test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo)
|
test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo)
|
||||||
|
|
||||||
# This will not trigger a rebuild. If needed, caller has to do this.
|
# This will not trigger a rebuild. If needed, caller has to do this.
|
||||||
def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False):
|
def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False,
|
||||||
|
enableQmlDebug=False, buildSystem=None):
|
||||||
selectBuildConfig(currentTarget, configName, None)
|
selectBuildConfig(currentTarget, configName, None)
|
||||||
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||||
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
|
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
if buildSystem == "qmake":
|
||||||
"type='QCheckBox' unnamed='1' visible='1' "
|
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
||||||
|
"type='QCheckBox' unnamed='1' visible='1' "
|
||||||
|
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
||||||
|
|
||||||
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
||||||
"type='QComboBox' unnamed='1' visible='1'}")
|
"type='QComboBox' unnamed='1' visible='1'}")
|
||||||
if shouldBeDebug:
|
if shouldBeDebug:
|
||||||
@@ -184,11 +188,15 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
|||||||
pass
|
pass
|
||||||
# Since waitForObject waits for the object to be enabled,
|
# Since waitForObject waits for the object to be enabled,
|
||||||
# it will wait here until compilation of the debug libraries has finished.
|
# it will wait here until compilation of the debug libraries has finished.
|
||||||
|
runCMakeButton = ("{type='QPushButton' text='Run CMake' unnamed='1' "
|
||||||
|
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||||
if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX):
|
if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX):
|
||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||||
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
|
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
|
||||||
# Don't rebuild now
|
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
clickButton(waitForObject(runCMakeButton))
|
||||||
|
elif buildSystem == "qmake": # Don't rebuild now
|
||||||
|
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||||
try:
|
try:
|
||||||
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
|
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
|
||||||
"type='QLabel' name='problemLabel' visible='1'}", 1000)
|
"type='QLabel' name='problemLabel' visible='1'}", 1000)
|
||||||
@@ -201,8 +209,10 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
|||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||||
if selectFromCombo(qmlDebuggingCombo, "Disable"):
|
if selectFromCombo(qmlDebuggingCombo, "Disable"):
|
||||||
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
||||||
# Don't rebuild now
|
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
clickButton(waitForObject(runCMakeButton))
|
||||||
|
elif buildSystem == "qmake": # Don't rebuild now
|
||||||
|
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
|
|
||||||
|
@@ -175,8 +175,24 @@ def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQ
|
|||||||
def isMsvcConfig(currentKit):
|
def isMsvcConfig(currentKit):
|
||||||
switchViewTo(ViewConstants.PROJECTS)
|
switchViewTo(ViewConstants.PROJECTS)
|
||||||
switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD)
|
switchToBuildOrRunSettingsFor(currentKit, ProjectSettings.BUILD)
|
||||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
|
||||||
isMsvc = " -spec win32-msvc" in str(waitForObject(":Qt Creator.Effective qmake call:_QTextEdit").plainText)
|
waitForObject(":Projects.ProjectNavigationTreeView")
|
||||||
|
bAndRIndex = getQModelIndexStr("text='Build & Run'", ":Projects.ProjectNavigationTreeView")
|
||||||
|
wantedKitName = Targets.getStringForTarget(currentKit)
|
||||||
|
wantedKitIndexString = getQModelIndexStr("text='%s'" % wantedKitName, bAndRIndex)
|
||||||
|
if not test.verify(__kitIsActivated__(findObject(wantedKitIndexString)),
|
||||||
|
"Verifying target '%s' is enabled." % wantedKitName):
|
||||||
|
raise Exception("Kit '%s' is not activated in the project." % wantedKitName)
|
||||||
|
index = waitForObject(wantedKitIndexString)
|
||||||
|
toolTip = str(index.data(Qt.ToolTipRole).toString())
|
||||||
|
compilerPattern = re.compile("<tr><td><b>Compiler:</b></td><td>(?P<compiler>.+)</td></tr>")
|
||||||
|
match = compilerPattern.search(toolTip)
|
||||||
|
if match is None:
|
||||||
|
test.warning("UI seems to have changed - failed to check for compiler.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
compiler = str(match.group("compiler"))
|
||||||
|
isMsvc = compiler.startswith("MSVC") or compiler.startswith("Microsoft Visual C")
|
||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
return isMsvc
|
return isMsvc
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ def checkSimpleCppLib(projectName, static):
|
|||||||
Targets.desktopTargetClasses(),
|
Targets.desktopTargetClasses(),
|
||||||
static, buildSystem="qmake")
|
static, buildSystem="qmake")
|
||||||
for kit, config in iterateBuildConfigs("Release"):
|
for kit, config in iterateBuildConfigs("Release"):
|
||||||
verifyBuildConfig(kit, config, False, True)
|
verifyBuildConfig(kit, config, False, True, buildSystem="qmake")
|
||||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||||
waitForCompile(10000)
|
waitForCompile(10000)
|
||||||
checkCompile()
|
checkCompile()
|
||||||
@@ -91,7 +91,7 @@ def main():
|
|||||||
buildSystem="qmake")
|
buildSystem="qmake")
|
||||||
virtualFunctionsAdded = False
|
virtualFunctionsAdded = False
|
||||||
for kit, config in iterateBuildConfigs("Debug"):
|
for kit, config in iterateBuildConfigs("Debug"):
|
||||||
verifyBuildConfig(kit, config, True, True)
|
verifyBuildConfig(kit, config, True, True, buildSystem="qmake")
|
||||||
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
|
||||||
waitForCompile(10000)
|
waitForCompile(10000)
|
||||||
if not virtualFunctionsAdded:
|
if not virtualFunctionsAdded:
|
||||||
|
@@ -98,7 +98,7 @@ def __handleAppOutputWaitForDebuggerFinish__():
|
|||||||
def performDebugging(projectName):
|
def performDebugging(projectName):
|
||||||
for kit, config in iterateBuildConfigs("Debug"):
|
for kit, config in iterateBuildConfigs("Debug"):
|
||||||
test.log("Selecting '%s' as build config" % config)
|
test.log("Selecting '%s' as build config" % config)
|
||||||
verifyBuildConfig(kit, config, True, True)
|
verifyBuildConfig(kit, config, True, True, buildSystem="qmake")
|
||||||
waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")
|
waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")
|
||||||
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
|
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
|
||||||
waitForCompile()
|
waitForCompile()
|
||||||
|
@@ -44,8 +44,8 @@ def main():
|
|||||||
'onTriggered: console.log("Break here")'])
|
'onTriggered: console.log("Break here")'])
|
||||||
invokeMenuItem("File", "Save All")
|
invokeMenuItem("File", "Save All")
|
||||||
filesAndLines = [
|
filesAndLines = [
|
||||||
{ "%s.Sources.main\\.cpp" % projectName : "QQmlApplicationEngine engine;" },
|
{ "%s.%s.Source Files.main\\.cpp" % (projectName, projectName) : "QQmlApplicationEngine engine;" },
|
||||||
{ "%s.Resources.qml\.qrc./.main\\.qml" % projectName : 'onTriggered.*' }
|
{ "%s.%s.qml\.qrc./.main\\.qml" % (projectName, projectName) : 'onTriggered.*' }
|
||||||
]
|
]
|
||||||
test.log("Setting breakpoints")
|
test.log("Setting breakpoints")
|
||||||
expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines)
|
expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines)
|
||||||
|
Reference in New Issue
Block a user