From f09ce82e23d4aa3deaeac88fcb16eee2d2d16e47 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 8 Mar 2013 10:49:14 +0100 Subject: [PATCH] Squish: Made tst_simple_debug more strict Change-Id: Iac438c8a55c8ea144c682257e140f9370e999e69 Reviewed-by: Christian Stenger --- tests/system/objects.map | 1 + tests/system/shared/debugger.py | 4 +++- tests/system/suite_debugger/tst_simple_debug/test.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index fb74b743bc7..20d237033a5 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -36,6 +36,7 @@ :DebugModeWidget.Debugger Log_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.Output' type='QDockWidget' visible='1' windowTitle='Debugger Log'} :DebugModeWidget.Debugger Toolbar_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger Toolbar' type='QDockWidget' visible='1' windowTitle='Debugger Toolbar'} :DebugModeWidget.OK_QPushButton {container=':Qt Creator.DebugModeWidget_QSplitter' text='OK' type='QPushButton' unnamed='1' visible='1'} +:DebugModeWidget_QComboBox {container=':Qt Creator.DebugModeWidget_QSplitter' occurrence='2' type='QComboBox' unnamed='1' visible='1'} :Debugger Toolbar.Continue_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Continue' type='QToolButton' unnamed='1' visible='1'} :Debugger Toolbar.Exit Debugger_QToolButton {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' text='Stop Debugger' type='QToolButton' unnamed='1' visible='1'} :Debugger Toolbar.StatusText_Utils::StatusLabel {container=':DebugModeWidget.Debugger Toolbar_QDockWidget' type='Utils::StatusLabel' unnamed='1'} diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py index 6d0d4ed2743..dcff56eac3b 100644 --- a/tests/system/shared/debugger.py +++ b/tests/system/shared/debugger.py @@ -207,10 +207,12 @@ def verifyBreakPoint(bpToVerify): fileName = bpToVerify.keys()[0] editor = getEditorForFileSuffix(fileName) if editor: + test.compare(waitForObject(":DebugModeWidget_QComboBox").toolTip, fileName, + "Verify that the right file is opened") textPos = editor.textCursor().position() line = str(editor.plainText)[:textPos].count("\n") + 1 windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle) - test.verify(fileName in windowTitle, + test.verify(os.path.basename(fileName) in windowTitle, "Verify that Creator's window title changed according to current file") return test.compare(line, bpToVerify.values()[0], "Compare hit breakpoint to expected line number in %s" % fileName) diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index 95c4a49135a..b23f2e4a885 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -33,7 +33,8 @@ def main(): test.log("Setting breakpoints") result = setBreakpointsForCurrentProject(filesAndLines) if result: - expectedBreakpointsOrder = [{"main.cpp":10}, {"main.qml":13}] + expectedBreakpointsOrder = [{os.path.join(workingDir, projectName, "main.cpp"):10}, + {os.path.join(workingDir, projectName, "qml", projectName, "main.qml"):13}] # Only use 4.7.4 to work around QTBUG-25187 availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug") if not availableConfigs: