Squish: Update debugger tests

The used project looks a little different now.

Change-Id: I786749a4aae5d2ceaff0d2fc65aedf41c04a66f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2017-09-14 14:36:26 +02:00
parent 05ef571922
commit cf370d5305
3 changed files with 7 additions and 14 deletions

View File

@@ -35,7 +35,9 @@ def main():
analyzerTargets = Targets.desktopTargetClasses() analyzerTargets = Targets.desktopTargetClasses()
checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=analyzerTargets) checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=analyzerTargets)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
if placeCursorToLine(editor, "MouseArea.*", True): if placeCursorToLine(editor, "}"):
type(editor, '<Left>')
type(editor, '<Return>')
type(editor, '<Up>') type(editor, '<Up>')
type(editor, '<Return>') type(editor, '<Return>')
typeLines(editor, ['Timer {', typeLines(editor, ['Timer {',

View File

@@ -3,18 +3,7 @@
"main.qml:15" "Handling Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" "main.qml:15" "Handling Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
"main.qml:15" "JavaScript" "2" "onTriggered" "main.qml:15" "JavaScript" "2" "onTriggered"
"main.qml:4" "Creating" "2" "QtQuick.Window/Window" "main.qml:4" "Creating" "2" "QtQuick.Window/Window"
"main.qml:33" "Creating" "2" "QtQuick/TextEdit"
"main.qml:1" "Compiling" "1" "main.qml" "main.qml:1" "Compiling" "1" "main.qml"
"main.qml:10" "Creating" "2" "QtQuick/Timer" "main.qml:10" "Creating" "2" "QtQuick/Timer"
"main.qml:37" "Binding" "1" "anchors.top: parent.top"
"main.qml:40" "Creating" "2" "QtQuick/Rectangle"
"main.qml:37" "JavaScript" "1" "expression for top"
"main.qml:14" "Binding" "3" "running: runCount < 2" "main.qml:14" "Binding" "3" "running: runCount < 2"
"main.qml:26" "Creating" "2" "QtQuick/MouseArea"
"main.qml:38" "Binding" "1" "anchors.horizontalCenter: parent.horizontalCenter"
"main.qml:38" "JavaScript" "1" "expression for horizontalCenter"
"main.qml:41" "Binding" "1" "anchors.fill: parent"
"main.qml:27" "Binding" "1" "anchors.fill: parent"
"main.qml:14" "JavaScript" "3" "expression for running" "main.qml:14" "JavaScript" "3" "expression for running"
"main.qml:41" "JavaScript" "1" "expression for fill"
"main.qml:27" "JavaScript" "1" "expression for fill"
1 0 1 6 11
3 main.qml:15 Handling Signal 2 onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }
4 main.qml:15 JavaScript 2 onTriggered
5 main.qml:4 Creating 2 QtQuick.Window/Window
main.qml:33 Creating 2 QtQuick/TextEdit
6 main.qml:1 Compiling 1 main.qml
7 main.qml:10 Creating 2 QtQuick/Timer
main.qml:37 Binding 1 anchors.top: parent.top
main.qml:40 Creating 2 QtQuick/Rectangle
main.qml:37 JavaScript 1 expression for top
8 main.qml:14 Binding 3 running: runCount < 2
main.qml:26 Creating 2 QtQuick/MouseArea
main.qml:38 Binding 1 anchors.horizontalCenter: parent.horizontalCenter
main.qml:38 JavaScript 1 expression for horizontalCenter
main.qml:41 Binding 1 anchors.fill: parent
main.qml:27 Binding 1 anchors.fill: parent
9 main.qml:14 JavaScript 3 expression for running
main.qml:41 JavaScript 1 expression for fill
main.qml:27 JavaScript 1 expression for fill

View File

@@ -35,7 +35,9 @@ def main():
workingDir = tempDir() workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targets) checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=targets)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
if placeCursorToLine(editor, "MouseArea.*", True): if placeCursorToLine(editor, "}"):
type(editor, '<Left>')
type(editor, '<Return>')
type(editor, '<Up>') type(editor, '<Up>')
type(editor, '<Return>') type(editor, '<Return>')
typeLines(editor, ['Timer {', typeLines(editor, ['Timer {',
@@ -50,7 +52,7 @@ def main():
test.log("Setting breakpoints") test.log("Setting breakpoints")
result = setBreakpointsForCurrentProject(filesAndLines) result = setBreakpointsForCurrentProject(filesAndLines)
if result: if result:
expectedBreakpointsOrder = [{os.path.join(workingDir, projectName, "main.cpp"):8}, expectedBreakpointsOrder = [{os.path.join(workingDir, projectName, "main.cpp"):10},
{os.path.join(workingDir, projectName, "main.qml"):13}] {os.path.join(workingDir, projectName, "main.qml"):13}]
availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug") availableConfigs = iterateBuildConfigs(len(checkedTargets), "Debug")
progressBarWait() progressBarWait()