Commit a22e2caa authored by Robert Loehning's avatar Robert Loehning

Squish: Added further sanity checks to tst_simple_analyze

Change-Id: I40adc90d4cb73ef4ba3d7c723953d272116e193a
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent e8f5502b
......@@ -89,6 +89,7 @@ def main():
"Internal::QV8ProfilerEventsMainView").model()
test.compare(model.rowCount(), 0)
if safeClickTab("Events"):
colPercent, colTotal, colCalls, colMean, colMedian, colLongest, colShortest = range(2, 9)
model = waitForObject(":Events.QmlProfilerEventsTable_QmlProfiler::"
"Internal::QmlProfilerEventsMainView").model()
if qtVersion.startswith("5."):
......@@ -100,10 +101,18 @@ def main():
else:
compareEventsTab(model, "events_qt47.tsv")
numberOfMsRows = 2
test.compare(dumpItems(model, column=2)[0], '100.00 %')
for i in [3, 5, 6, 7, 8]:
test.compare(dumpItems(model, column=colPercent)[0], '100.00 %')
for i in [colTotal, colMean, colMedian, colLongest, colShortest]:
for item in dumpItems(model, column=i)[:numberOfMsRows]:
test.verify(item.endswith(' ms'))
for row in range(model.rowCount()):
if str(model.index(row, colCalls).data()) == "1":
for col in [colMedian, colLongest, colShortest]:
test.compare(model.index(row, colMean).data(), model.index(row, col).data(),
"For just one call, no differences in execution time may be shown.")
elif str(model.index(row, colCalls).data()) == "2":
test.compare(model.index(row, colMedian).data(), model.index(row, colLongest).data(),
"For two calls, median and longest time must be the same.")
deleteAppFromWinFW(workingDir, projectName, False)
invokeMenuItem("File", "Exit")
......
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