From a22e2caadff90c73cd088d8f418987db75e9636a Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 9 Sep 2013 12:34:00 +0200 Subject: Squish: Added further sanity checks to tst_simple_analyze Change-Id: I40adc90d4cb73ef4ba3d7c723953d272116e193a Reviewed-by: Christian Stenger --- tests/system/suite_debugger/tst_simple_analyze/test.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 2ffe25022a..6ebee1a1d3 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -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") -- cgit v1.2.1