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:
Christian Stenger
2022-03-15 15:34:22 +01:00
parent 42d7a96a67
commit f43348c4f2
6 changed files with 42 additions and 20 deletions

View File

@@ -22,7 +22,6 @@
: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_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.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'}
@@ -118,15 +117,12 @@
: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'}
: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.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.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.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_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'}

View File

@@ -163,13 +163,17 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT):
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.
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)
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'} "
"type='QCheckBox' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
if buildSystem == "qmake":
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
"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' "
"type='QComboBox' unnamed='1' visible='1'}")
if shouldBeDebug:
@@ -184,11 +188,15 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
pass
# Since waitForObject waits for the object to be enabled,
# 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):
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
# Don't rebuild now
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
clickButton(waitForObject(runCMakeButton))
elif buildSystem == "qmake": # Don't rebuild now
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
try:
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
"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')
if selectFromCombo(qmlDebuggingCombo, "Disable"):
test.log("Qml debugging libraries are available - unchecked qml debugging.")
# Don't rebuild now
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
clickButton(waitForObject(runCMakeButton))
elif buildSystem == "qmake": # Don't rebuild now
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
switchViewTo(ViewConstants.EDIT)

View File

@@ -175,8 +175,24 @@ def doSimpleDebugging(currentKit, currentConfigName, expectedBPOrder=[], enableQ
def isMsvcConfig(currentKit):
switchViewTo(ViewConstants.PROJECTS)
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)
return isMsvc

View File

@@ -67,7 +67,7 @@ def checkSimpleCppLib(projectName, static):
Targets.desktopTargetClasses(),
static, buildSystem="qmake")
for kit, config in iterateBuildConfigs("Release"):
verifyBuildConfig(kit, config, False, True)
verifyBuildConfig(kit, config, False, True, buildSystem="qmake")
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
waitForCompile(10000)
checkCompile()
@@ -91,7 +91,7 @@ def main():
buildSystem="qmake")
virtualFunctionsAdded = False
for kit, config in iterateBuildConfigs("Debug"):
verifyBuildConfig(kit, config, True, True)
verifyBuildConfig(kit, config, True, True, buildSystem="qmake")
invokeMenuItem('Build', 'Build Project "%s"' % projectName)
waitForCompile(10000)
if not virtualFunctionsAdded:

View File

@@ -98,7 +98,7 @@ def __handleAppOutputWaitForDebuggerFinish__():
def performDebugging(projectName):
for kit, config in iterateBuildConfigs("Debug"):
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")
selectFromLocator("t rebuild", "Rebuild (Rebuild All Projects)")
waitForCompile()

View File

@@ -44,8 +44,8 @@ def main():
'onTriggered: console.log("Break here")'])
invokeMenuItem("File", "Save All")
filesAndLines = [
{ "%s.Sources.main\\.cpp" % projectName : "QQmlApplicationEngine engine;" },
{ "%s.Resources.qml\.qrc./.main\\.qml" % projectName : 'onTriggered.*' }
{ "%s.%s.Source Files.main\\.cpp" % (projectName, projectName) : "QQmlApplicationEngine engine;" },
{ "%s.%s.qml\.qrc./.main\\.qml" % (projectName, projectName) : 'onTriggered.*' }
]
test.log("Setting breakpoints")
expectedBreakpointsOrder = setBreakpointsForCurrentProject(filesAndLines)