diff options
author | Robert Loehning <robert.loehning@nokia.com> | 2012-05-11 17:38:58 +0200 |
---|---|---|
committer | Robert Löhning <robert.loehning@nokia.com> | 2012-05-11 21:15:51 +0200 |
commit | 49a3f0129a92ea321d93e139b787f7bedfb983be (patch) | |
tree | 0214d6281c5dd3285596e76f6b9e7fdff9ae7ac2 | |
parent | 7b51bfc845b1c768dbeca64a517f1f81fd8dd843 (diff) | |
download | qt-creator-49a3f0129a92ea321d93e139b787f7bedfb983be.tar.gz |
Squish: Run tst_simple_debug with Qt 4.7
Change-Id: Ibc330a7ca3e1c378c78cf8eb4c559c2a99c3d8d0
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
-rw-r--r-- | tests/system/objects.map | 4 | ||||
-rw-r--r-- | tests/system/shared/build_utils.py | 15 | ||||
-rw-r--r-- | tests/system/suite_debugger/tst_simple_debug/test.py | 18 |
3 files changed, 29 insertions, 8 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map index 2f228d6fd4..85fbbb44be 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -32,6 +32,8 @@ :Options.qt_tabwidget_tabbar_QTabBar {name='qt_tabwidget_tabbar' type='QTabBar' visible='1' window=':Options_Core::Internal::SettingsDialog'} :Options_Core::Internal::SettingsDialog {type='Core::Internal::SettingsDialog' unnamed='1' visible='1' windowTitle~='(Options|Preferences)'} :Options_QListView {type='QListView' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'} +:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'} +:QML Debugging_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='QML Debugging'} :Qt Creator.Create Build Configurations:_QComboBox {leftWidget=':Qt Creator.Create Build Configurations:_QLabel' type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Create Build Configurations:_QLabel {text='Create build configurations:' type='QLabel' 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'} @@ -69,11 +71,13 @@ :scrollArea.Details_Utils::DetailsButton {container=':Qt Creator.scrollArea_QScrollArea' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1'} :scrollArea.Edit build configuration:_QComboBox {container=':Qt Creator.scrollArea_QScrollArea' leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'} :scrollArea.Edit build configuration:_QLabel {container=':Qt Creator.scrollArea_QScrollArea' text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'} +:scrollArea.Library not available_QLabel {container=':Qt Creator.scrollArea_QScrollArea' name='qmlDebuggingWarningText' text?='Library not available*' type='QLabel' visible='1'} :scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text?='*Qt 4.* for *(Qt SDK) debug' type='QCheckBox' unnamed='1' visible='1'} :scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text?='*Qt 4.* for *(Qt SDK) release' type='QCheckBox' unnamed='1' visible='1'} :scrollArea.Qt Version:_QComboBox {aboveWidget=':scrollArea.Use Shadow Building_QCheckBox' container=':Qt Gui Application.scrollArea_QScrollArea' leftWidget=':scrollArea.Qt Version:_QLabel' type='QComboBox' unnamed='1' visible='1'} :scrollArea.Qt Version:_QLabel {container=':Qt Gui Application.scrollArea_QScrollArea' text='Qt Version:' type='QLabel' unnamed='1' visible='1'} :scrollArea.Use Shadow Building_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text='Shadow build' type='QCheckBox' unnamed='1' visible='1'} +:scrollArea.qmlDebuggingLibraryCheckBox_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' name='qmlDebuggingLibraryCheckBox' type='QCheckBox' visible='1'} :scrollArea.qtVersionComboBox_QComboBox {container=':Qt Creator.scrollArea_QScrollArea' name='qtVersionComboBox' type='QComboBox' visible='1'} :scrollArea_QTableView {container=':Qt Creator.scrollArea_QScrollArea' type='QTableView' unnamed='1' visible='1'} :sourceFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Source file:_QLabel' name='sourceFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'} diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 156cdad1a7..b593119465 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -164,7 +164,8 @@ def selectBuildConfig(targetCount, currentTarget, configName): "sourceFilesRefreshed(QStringList)") switchViewTo(ViewConstants.EDIT) -def verifyBuildConfig(targetCount, currentTarget, shouldBeDebug=False, enableShadowBuild=False): +# This will not trigger a rebuild. If needed, caller has to do this. +def verifyBuildConfig(targetCount, currentTarget, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False): switchViewTo(ViewConstants.PROJECTS) switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD) detailsButton = waitForObject(":scrollArea.Details_Utils::DetailsButton") @@ -177,6 +178,18 @@ def verifyBuildConfig(targetCount, currentTarget, shouldBeDebug=False, enableSha else: test.compare(buildCfCombo.currentText, 'Release', "Verifying whether it's a release build") try: + libLabel = waitForObject(":scrollArea.Library not available_QLabel", 2000) + mouseClick(libLabel, libLabel.width - 5, 5, 0, Qt.LeftButton) + except: + 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) + # Don't rebuild now + clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000)) + try: problemFound = waitForObject("{container=':Qt Creator.scrollArea_QScrollArea' type='QLabel' " "name='problemLabel' visible='1'}", 1000) if problemFound: diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 4dce12bab1..69f40d5936 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -5,7 +5,7 @@ workingDir = None def main(): global workingDir startApplication("qtcreator" + SettingsPath) - if not checkDebuggingLibrary("4.8.0", [QtQuickConstants.Targets.DESKTOP]): + if not checkDebuggingLibrary("4.7.4", [QtQuickConstants.Targets.DESKTOP]): test.fatal("Error while checking debugging libraries - leaving this test.") invokeMenuItem("File", "Exit") return @@ -20,23 +20,27 @@ def main(): if placeCursorToLine(editor, "MouseArea.*", True): type(editor, '<Up>') type(editor, '<Return>') - type(editor, 'Component.onCompleted: console.log("Break here")') + typeLines(editor, ['Timer {', + 'interval: 1000', + 'running: true', + 'onTriggered: console.log("Break here")']) invokeMenuItem("File", "Save All") filesAndLines = { - "%s.QML.qml/%s.main\\.qml" % (projectName,projectName) : 'Component.onCompleted.*', + "%s.QML.qml/%s.main\\.qml" % (projectName,projectName) : 'onTriggered:.*', "%s.Sources.main\\.cpp" % projectName : "viewer.setOrientation\\(.+\\);" } test.log("Setting breakpoints") result = setBreakpointsForCurrentProject(filesAndLines) if result: - expectedBreakpointsOrder = [{"main.cpp":9}, {"main.qml":11}] - availableConfigs = iterateBuildConfigs(1, 0, ".*4\.8(\.\d+)?.*$(?<![Rr]elease)") + expectedBreakpointsOrder = [{"main.cpp":9}, {"main.qml":14}] + # Only use 4.7.4 to work around QTBUG-25187 + availableConfigs = iterateBuildConfigs(1, 0, ".*4\.7\.4.*$(?<![Rr]elease)") if not availableConfigs: - test.fatal("Haven't found a suitable Qt version (need Qt >= 4.8) - leaving without debugging.") + test.fatal("Haven't found a suitable Qt version (need Qt 4.7.4) - leaving without debugging.") for config in availableConfigs: test.log("Selecting '%s' as build config" % config) selectBuildConfig(1, 0, config) - verifyBuildConfig(1, 0, True) + verifyBuildConfig(1, 0, 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'}", |