Commit ed1f8b9d authored by Robert Loehning's avatar Robert Loehning

Squish: Update tst_simple_analyze

Change-Id: Ifba9af5446fec3daa42aa9794a26d02e23b8459d
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 80082e58
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Continue_Core::Internal::FancyToolButton {text='Continue' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Continue_Core::Internal::FancyToolButton {text='Continue' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.DoubleTabWidget_ProjectExplorer::Internal::DoubleTabWidget {name='ProjectExplorer__Internal__DoubleTabWidget' type='ProjectExplorer::Internal::DoubleTabWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='DoubleTabWidget'} :*Qt Creator.DoubleTabWidget_ProjectExplorer::Internal::DoubleTabWidget {name='ProjectExplorer__Internal__DoubleTabWidget' type='ProjectExplorer::Internal::DoubleTabWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='DoubleTabWidget'}
:*Qt Creator.Events_QDockWidget {name='QmlProfilerEventsViewDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Events'} :*Qt Creator.Events_QDockWidget {name='QmlProfilerStatisticsViewDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Events_QTabBar {aboveWidget=':*Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Events_QTabBar {aboveWidget=':*Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:*Qt Creator.Find_Find::Internal::FindToolBar {name='Core__Internal__FindWidget' type='Core::Internal::FindToolBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Find'} :*Qt Creator.Find_Find::Internal::FindToolBar {name='Core__Internal__FindWidget' type='Core::Internal::FindToolBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Find'}
:*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack {name='FormEditorStack' type='Designer::Internal::FormEditorStack' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack {name='FormEditorStack' type='Designer::Internal::FormEditorStack' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
:Dialog_Debugger::Internal::SymbolPathsDialog {name='Debugger__Internal__SymbolPathsDialog' type='Debugger::Internal::SymbolPathsDialog' visible='1' windowTitle='Dialog'} :Dialog_Debugger::Internal::SymbolPathsDialog {name='Debugger__Internal__SymbolPathsDialog' type='Debugger::Internal::SymbolPathsDialog' visible='1' windowTitle='Dialog'}
:Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'} :Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'}
:Edit Environment_ProjectExplorer::EnvironmentItemsDialog {type='ProjectExplorer::EnvironmentItemsDialog' unnamed='1' visible='1' windowTitle='Edit Environment'} :Edit Environment_ProjectExplorer::EnvironmentItemsDialog {type='ProjectExplorer::EnvironmentItemsDialog' unnamed='1' visible='1' windowTitle='Edit Environment'}
:Events.QmlProfilerEventsTable_QmlProfiler::Internal::QmlProfilerEventsMainView {container=':*Qt Creator.Events_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QmlProfilerEventsMainView' visible='1'} :Events.QmlProfilerEventsTable_QmlProfiler::Internal::QmlProfilerEventsMainView {container=':*Qt Creator.Events_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QmlProfilerStatisticsMainView' visible='1'}
:Executable:_Utils::PathChooser {buddy=':scrollArea.Executable:_QLabel' type='Utils::PathChooser' unnamed='1' visible='1'} :Executable:_Utils::PathChooser {buddy=':scrollArea.Executable:_QLabel' type='Utils::PathChooser' unnamed='1' visible='1'}
:Failed to start application_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Failed to start application'} :Failed to start application_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Failed to start application'}
:File has been removed.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':File has been removed_QMessageBox'} :File has been removed.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':File has been removed_QMessageBox'}
......
...@@ -95,8 +95,9 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): ...@@ -95,8 +95,9 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
"Elapsed time should be positive in string '%s'" % str(elapsedLabel.text)) "Elapsed time should be positive in string '%s'" % str(elapsedLabel.text))
except: except:
test.fatal("Could not read elapsed time from '%s'" % str(elapsedLabel.text)) test.fatal("Could not read elapsed time from '%s'" % str(elapsedLabel.text))
if safeClickTab("Events"): if safeClickTab("Statistics"):
colPercent, colTotal, colCalls, colMean, colMedian, colLongest, colShortest = range(2, 9) (colPercent, colTotal, colSelfPercent, colSelf, colCalls,
colMean, colMedian, colLongest, colShortest) = range(2, 11)
model = waitForObject(":Events.QmlProfilerEventsTable_QmlProfiler::" model = waitForObject(":Events.QmlProfilerEventsTable_QmlProfiler::"
"Internal::QmlProfilerEventsMainView").model() "Internal::QmlProfilerEventsMainView").model()
compareEventsTab(model, "events_qt5.tsv") compareEventsTab(model, "events_qt5.tsv")
...@@ -111,6 +112,11 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): ...@@ -111,6 +112,11 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
test.verify(not item.startswith('0.000 '), test.verify(not item.startswith('0.000 '),
"Check for implausible durations (QTCREATORBUG-8996): %s" % item) "Check for implausible durations (QTCREATORBUG-8996): %s" % item)
for row in range(model.rowCount()): for row in range(model.rowCount()):
selfPercent = str(model.index(row, colSelfPercent).data())
totalPercent = str(model.index(row, colPercent).data())
test.verify(float(selfPercent[:-2]) <= float(totalPercent[:-2]),
"Self percentage (%s) can't be more than total percentage (%s)"
% (selfPercent, totalPercent))
if str(model.index(row, colCalls).data()) == "1": if str(model.index(row, colCalls).data()) == "1":
for col in [colMedian, colLongest, colShortest]: for col in [colMedian, colLongest, colShortest]:
test.compare(model.index(row, colMean).data(), model.index(row, col).data(), test.compare(model.index(row, colMean).data(), model.index(row, col).data(),
...@@ -124,7 +130,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): ...@@ -124,7 +130,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.") test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.")
def compareEventsTab(model, file): def compareEventsTab(model, file):
significantColumns = [0, 1, 4, 9] significantColumns = [0, 1, 6, 11]
expectedTable = [] expectedTable = []
for record in testData.dataset(file): for record in testData.dataset(file):
......
"0" "1" "4" "9" "0" "1" "6" "11"
"<program>" "" "1" "Main Program" "<program>" "" "1" "Main Program"
"main.qml:4" "Create" "2" "QtQuick.Window/Window" "main.qml:4" "Create" "2" "QtQuick.Window/Window"
"main.qml:12" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" "main.qml:12" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment