forked from qt-creator/qt-creator
Squish: Update opening of CMake projects
Change-Id: I0131d43c1d7b6d835fb2e1e6c5b5a9d27825a849 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -39,11 +39,6 @@
|
||||
:Breakpoints_Debugger::Internal::BreakTreeView {container=':Debugger.Docks.BreakDockWidget.Debugger.Docks.Break_QFrame' type='Debugger::Internal::BreakTreeView' unnamed='1' visible='1'}
|
||||
:Build and Run.Save all files before build_QCheckBox {name='saveAllFilesCheckBox' type='QCheckBox' visible='1'}
|
||||
:BuildAndRun_QTreeView {container=':qt_tabwidget_stackedwidget_QWidget' type='QTreeView' unnamed='1' visible='1'}
|
||||
:CMake Wizard.Cancel_QPushButton {text='Cancel' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||
:CMake Wizard.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||
:CMake Wizard.Generator:_QLabel {text='Generator:' type='QLabel' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||
:CMake Wizard.Run CMake_QPushButton {text='Run CMake' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
|
||||
:CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard {type='CMakeProjectManager::Internal::CMakeOpenProjectWizard' unnamed='1' visible='1' windowTitle='CMake Wizard'}
|
||||
:Cannot Open Project.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Cannot Open Project_QMessageBox'}
|
||||
:Cannot Open Project.Show Details..._QPushButton {text='Show Details...' type='QPushButton' unnamed='1' visible='1' window=':Cannot Open Project_QMessageBox'}
|
||||
:Cannot Open Project_QMessageBox {text?='Failed to open project in *' type='QMessageBox' unnamed='1' visible='1'}
|
||||
@@ -93,7 +88,6 @@
|
||||
:FormEditorStack.menuBar_QDesignerMenuBar {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' name='menuBar' type='QDesignerMenuBar' visible='1'}
|
||||
:FormEditorStack_qdesigner_internal::FormWindow {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::FormWindow' unnamed='1' visible='1'}
|
||||
:FormEditorStack_qdesigner_internal::PropertyLineEdit {container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::PropertyLineEdit' unnamed='1' visible='1'}
|
||||
:Generator:_QComboBox {buddy=':CMake Wizard.Generator:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
||||
:Git Repository Clone.Cancel_QPushButton {text='Cancel' type='QPushButton' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
|
||||
:Git Repository Clone.Finish_QPushButton {text~='(Finish|Done)' type='QPushButton' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
|
||||
:Git Repository Clone.Result._QLabel {type='QLabel' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
|
||||
|
||||
@@ -79,23 +79,6 @@ def openCmakeProject(projectPath, buildDir):
|
||||
__chooseTargets__(Targets.DESKTOP_480_DEFAULT, additionalFunc=additionalFunction)
|
||||
clickButton(waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'"
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}"))
|
||||
return __handleCmakeWizardPage__()
|
||||
|
||||
def __handleCmakeWizardPage__():
|
||||
generatorText = "Unix Generator (Desktop 480 GCC)"
|
||||
if platform.system() in ('Windows', 'Microsoft'):
|
||||
generatorText = "NMake Generator (Desktop 480 MSVC2010)"
|
||||
selectFromCombo(waitForObject(":Generator:_QComboBox"), generatorText)
|
||||
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton"))
|
||||
try:
|
||||
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
|
||||
except LookupError:
|
||||
cmakeOutput = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' "
|
||||
"window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}")
|
||||
test.warning("Error while executing cmake - see details for cmake output.",
|
||||
str(cmakeOutput.plainText))
|
||||
clickButton(waitForObject(":CMake Wizard.Cancel_QPushButton"))
|
||||
return False
|
||||
return True
|
||||
|
||||
# this function returns a list of available targets - this is not 100% error proof
|
||||
|
||||
@@ -123,19 +123,13 @@ def main():
|
||||
continue
|
||||
if button == ":Git Repository Clone.Finish_QPushButton":
|
||||
try:
|
||||
# CMake wizard shown
|
||||
clickButton(waitForObject(":CMake Wizard.Cancel_QPushButton", 5000))
|
||||
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
|
||||
test.passes("The checked out project was being opened with CMake.")
|
||||
# Projects mode shown
|
||||
clickButton(waitForObject(":*Qt Creator.Cancel_QPushButton", 5000))
|
||||
test.passes("The checked out project was being opened.")
|
||||
except:
|
||||
try:
|
||||
# QMake Project mode shown
|
||||
clickButton(waitForObject(":*Qt Creator.Cancel_QPushButton", 5000))
|
||||
test.passes("The checked out project was being opened with QMake.")
|
||||
except:
|
||||
clickButton(waitForObject(":Cannot Open Project.Show Details..._QPushButton"))
|
||||
test.fail("The checked out project was not being opened.",
|
||||
waitForObject(":Cannot Open Project_QTextEdit").plainText)
|
||||
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
|
||||
clickButton(waitForObject(":Cannot Open Project.Show Details..._QPushButton"))
|
||||
test.fail("The checked out project was not being opened.",
|
||||
waitForObject(":Cannot Open Project_QTextEdit").plainText)
|
||||
clickButton(waitForObject(":Cannot Open Project.OK_QPushButton"))
|
||||
verifyVersionControlView(targetDir, button == "Cancel immediately")
|
||||
invokeMenuItem("File", "Exit")
|
||||
|
||||
Reference in New Issue
Block a user