forked from qt-creator/qt-creator
Squish: Fix tst_debug_empty_main
Change-Id: I5c484a46cf795feee17c200416c4cd303c189774 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -127,6 +127,8 @@
|
||||
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
||||
:Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'}
|
||||
:Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1'}
|
||||
:Qt Creator.QML debugging and profiling:_QComboBox {leftWidget=':Qt Creator.QML debugging and profiling:_QLabel' type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.QML debugging and profiling:_QLabel {text='QML debugging and profiling:' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.ReRun_QToolButton {toolTip='Re-run this run-configuration' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
@@ -216,7 +218,6 @@
|
||||
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
||||
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
|
||||
:scrollArea.Library not available_QLabel {name='qmlDebuggingWarningText' text?='Library not available*' type='QLabel' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:scrollArea.qmlDebuggingLibraryCheckBox_QCheckBox {name='qmlDebuggingLibraryCheckBox' type='QCheckBox' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {name='SrcFileName' type='Utils::FancyLineEdit' visible='1' window=':New_ProjectExplorer::JsonWizard'}
|
||||
:splitter.Commit File(s)_VcsBase::QActionPushButton {text~='(Commit .+/.+ File.*)' type='VcsBase::QActionPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:splitter.Description_QGroupBox {container=':Qt Creator.splitter_QSplitter' name='descriptionBox' title='Description' type='QGroupBox' visible='1'}
|
||||
|
@@ -170,8 +170,8 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
||||
"type='QCheckBox' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
||||
buildCfCombo = waitForObject("{type='QComboBox' name='buildConfigurationComboBox' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
||||
"type='QComboBox' unnamed='1' visible='1'}")
|
||||
if shouldBeDebug:
|
||||
test.compare(buildCfCombo.currentText, 'Debug', "Verifying whether it's a debug build")
|
||||
else:
|
||||
@@ -184,9 +184,9 @@ 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.
|
||||
qmlDebugCheckbox = waitForObject(":scrollArea.qmlDebuggingLibraryCheckBox_QCheckBox", 150000)
|
||||
if qmlDebugCheckbox.checked != enableQmlDebug:
|
||||
clickButton(qmlDebugCheckbox)
|
||||
if currentTarget not in (Targets.DESKTOP_4_8_7_DEFAULT, Targets.EMBEDDED_LINUX):
|
||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||
selectFromCombo(qmlDebuggingCombo, 'Enable')
|
||||
# Don't rebuild now
|
||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||
try:
|
||||
@@ -197,10 +197,10 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
qmlDebugCheckbox = findObject(":scrollArea.qmlDebuggingLibraryCheckBox_QCheckBox")
|
||||
if qmlDebugCheckbox.enabled and qmlDebugCheckbox.checked:
|
||||
test.log("Qml debugging libraries are available - unchecking qml debugging.")
|
||||
clickButton(qmlDebugCheckbox)
|
||||
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, "Disable"):
|
||||
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
||||
# Don't rebuild now
|
||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||
|
@@ -36,7 +36,7 @@ def addFileToProject(projectPath, category, fileTemplate, fileName):
|
||||
projectPath, "Verifying whether path is correct."):
|
||||
replaceEditorContent(pathLineEdit, projectPath)
|
||||
clickButton(waitForObject(":Next_QPushButton"))
|
||||
projCombo = waitForObject("{buddy={name='projectLabel' text='Add to project:' type='QLabel' "
|
||||
projCombo = findObject("{buddy={name='projectLabel' text='Add to project:' type='QLabel' "
|
||||
"visible='1'} name='projectComboBox' type='QComboBox' visible='1'}")
|
||||
proFileName = os.path.basename(projectPath) + ".pro"
|
||||
test.verify(not selectFromCombo(projCombo, proFileName), "Verifying project is selected.")
|
||||
@@ -51,6 +51,7 @@ def main():
|
||||
# empty Qt
|
||||
workingDir = tempDir()
|
||||
projectName = createEmptyQtProject(workingDir, "EmptyQtProj", targets)
|
||||
waitForProjectParsing()
|
||||
addFileToProject(os.path.join(workingDir, projectName), " C++", "C++ Source File", "main.cpp")
|
||||
editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
|
||||
typeLines(editor, ["int main() {"])
|
||||
@@ -65,6 +66,7 @@ def main():
|
||||
qtVersion = qtVersion.replace(".", "")
|
||||
projectName = createNewNonQtProject(workingDir, "Sample%s%s" % (name, qtVersion),
|
||||
[singleTarget], isC)
|
||||
waitForProjectParsing()
|
||||
if projectName == None:
|
||||
test.fail("Failed to create Sample%s%s" % (name, qtVersion),
|
||||
"Target: %s, plainC: %s" % (Targets.getStringForTargt(singleTarget), isC))
|
||||
@@ -94,7 +96,7 @@ def performDebugging(projectName):
|
||||
test.log("Selecting '%s' as build config" % config)
|
||||
verifyBuildConfig(kit, config, True, True)
|
||||
waitForObject(":*Qt Creator.Build Project_Core::Internal::FancyToolButton")
|
||||
invokeMenuItem("Build", "Rebuild All")
|
||||
invokeMenuItem("Build", "Rebuild All Projects")
|
||||
waitForCompile()
|
||||
isMsvc = isMsvcConfig(kit)
|
||||
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
|
||||
|
Reference in New Issue
Block a user