From 507e5f76faf25aa1aea718f6e92584b567fea53b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 17 Feb 2023 13:38:13 +0100 Subject: [PATCH] SquishTests: Fix expectation for profiling Wizard template has changed and we use Qt6.2 nowadays. Change-Id: I63d0103ac324bcf83f0b07802f57a171589a2fb1 Reviewed-by: Reviewed-by: David Schulz --- tests/system/suite_debugger/tst_simple_analyze/test.py | 6 +++--- .../tst_simple_analyze/testdata/events_qt5.10.1.tsv | 10 ---------- .../tst_simple_analyze/testdata/events_qt6.2.4.tsv | 10 ++++++++++ 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.10.1.tsv create mode 100644 tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt6.2.4.tsv diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 0d5e3f3feb7..2b454ea0746 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -30,7 +30,7 @@ def main(): invokeMenuItem("File", "Save All") availableConfigs = iterateBuildConfigs("Debug") if not availableConfigs: - test.fatal("Haven't found a suitable Qt version (need Qt 5.3+) - leaving without debugging.") + test.fatal("Haven't found a suitable Qt version (need Qt 6.2+) - leaving without profiling.") else: performTest(workingDir, projectName, availableConfigs) invokeMenuItem("File", "Exit") @@ -77,7 +77,7 @@ def performTest(workingDir, projectName, availableConfigs): colMean, colMedian, colLongest, colShortest) = range(2, 11) model = waitForObject(":Events.QmlProfilerEventsTable_QmlProfiler::" "Internal::QmlProfilerStatisticsMainView").model() - compareEventsTab(model, "events_qt5.10.1.tsv") + compareEventsTab(model, "events_qt6.2.4.tsv") test.compare(dumpItems(model, column=colPercent)[0], '100 %') # cannot run following test on colShortest (unstable) for i in [colMean, colMedian, colLongest]: @@ -120,7 +120,7 @@ def compareEventsTab(model, file): "Checking number of rows in Events table") if not test.verify(containsOnce(expectedTable, foundTable), "Verifying that Events table matches expected values"): - test.log("Events displayed by Creator: %s" % foundTable) + test.log("Events displayed by Creator: %s" % foundTable, str(expectedTable)) def containsOnce(tuple, items): for item in items: diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.10.1.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.10.1.tsv deleted file mode 100644 index 8f40828cd41..00000000000 --- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.10.1.tsv +++ /dev/null @@ -1,10 +0,0 @@ -"0" "1" "6" "11" -"" "" "1" "Main program" -"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:4" "Creating" "2" "QtQuick.Window/Window" -"main.qml:0" "Compiling" "1" "main.qml" -"main.qml:10" "Creating" "2" "QtQuick/Timer" -"main.qml:14" "Binding" "3" "running: runCount < 2" -"main.qml:14" "JavaScript" "3" "expression for running" -"" "Binding" "1" "Source code not available" diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt6.2.4.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt6.2.4.tsv new file mode 100644 index 00000000000..7ab9ac87edb --- /dev/null +++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt6.2.4.tsv @@ -0,0 +1,10 @@ +"0" "1" "6" "11" +"" "" "1" "Main program" +"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" "expression for onTriggered" +"Main.qml:4" "Creating" "2" "QtQuick/Window" +"Main.qml:0" "Compiling" "1" "Main.qml" +"Main.qml:10" "Creating" "2" "QtQml/Timer" +"Main.qml:14" "Binding" "3" "running: runCount < 2" +"Main.qml:14" "JavaScript" "3" "expression for running" +"" "Binding" "1" "Source code not available"