aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@nokia.com>2012-05-04 17:15:29 +0200
committerChristian Stenger <christian.stenger@nokia.com>2012-05-07 14:55:14 +0200
commitb63135c067d49a96c56195f75e7a6637c97c0702 (patch)
tree17d60f7e5a36ccd7091e8ac22fab32c6a4f184cb
parent3872597d091427102e368570cf7c28bc4830fd0d (diff)
Squish: Fix possible access to None
Change-Id: I4c4a0f211169dad48a4a6b78e4c298b986d07158 Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
-rw-r--r--tests/system/shared/debugger.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py
index 42957d8d24..7ee0db886a 100644
--- a/tests/system/shared/debugger.py
+++ b/tests/system/shared/debugger.py
@@ -64,9 +64,13 @@ def setBreakpointsForCurrentProject(filesAndLines):
return False
invokeMenuItem("Debug", "Toggle Breakpoint")
test.log('Set breakpoint in %s' % fName, curLine)
- breakPointTreeView = waitForObject("{type='Debugger::Internal::BreakWindow' visible='1' "
- "windowTitle='Breakpoints' name='Debugger.Docks.Break'}")
- waitFor("breakPointTreeView.model().rowCount() == len(filesAndLines)", 2000)
+ try:
+ breakPointTreeView = waitForObject("{type='Debugger::Internal::BreakWindow' visible='1' "
+ "windowTitle='Breakpoints' name='Debugger.Docks.Break'}")
+ waitFor("breakPointTreeView.model().rowCount() == len(filesAndLines)", 2000)
+ except:
+ test.fatal("UI seems to have changed - check manually and fix this script.")
+ return False
test.compare(breakPointTreeView.model().rowCount(), len(filesAndLines),
'Expected %d set break points, found %d listed' %
(len(filesAndLines), breakPointTreeView.model().rowCount()))
@@ -89,8 +93,9 @@ def removeOldBreakpoints():
rect = breakPointTreeView.visualRect(currentIndex)
mouseClick(breakPointTreeView, rect.x+5, rect.y+5, 0, Qt.LeftButton)
type(breakPointTreeView, "<Delete>")
- except LookupError:
- pass
+ except:
+ test.fatal("UI seems to have changed - check manually and fix this script.")
+ return False
return test.compare(model.rowCount(), 0, "Check if all breakpoints have been removed.")
# function to do simple debugging of the current (configured) project