forked from qt-creator/qt-creator
		
	Squish: Added further sanity checks to tst_simple_analyze
Change-Id: I40adc90d4cb73ef4ba3d7c723953d272116e193a Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
		@@ -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")
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user