From fe5d753d95f9b8091bd69234f0cc73682fb69a6b Mon Sep 17 00:00:00 2001 From: Olli Leppanen Date: Thu, 25 Nov 2010 14:27:08 +0200 Subject: [PATCH] Changes: Polished the startup time performance tests RevBy:Juha Lintula --- tests/Harmattan/TestScripts/get-coordinates.rb | 3 +++ tests/Harmattan/TestScripts/test-perf.rb | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/Harmattan/TestScripts/get-coordinates.rb b/tests/Harmattan/TestScripts/get-coordinates.rb index ac2f5e0..0e82015 100755 --- a/tests/Harmattan/TestScripts/get-coordinates.rb +++ b/tests/Harmattan/TestScripts/get-coordinates.rb @@ -66,6 +66,9 @@ appName=options[:application] sut = TDriver.sut(:Id=> 'sut_qt_maemo') appOnTop = sut.application() +# Stop the MProgressIndicator +system("initctl stop xsession/MProgressIndicator") + while appOnTop.attribute('objectName') != 'meegotouchhome' fullName = appOnTop.attribute('FullName') diff --git a/tests/Harmattan/TestScripts/test-perf.rb b/tests/Harmattan/TestScripts/test-perf.rb index 1ac7ab0..9b1194a 100755 --- a/tests/Harmattan/TestScripts/test-perf.rb +++ b/tests/Harmattan/TestScripts/test-perf.rb @@ -93,10 +93,11 @@ class TC_PerformanceTests < Test::Unit::TestCase system("initctl stop xsession/sysuid") system("initctl stop xsession/applifed") system("initctl stop xsession/search") - system("/sbin/initctl restart xsession/mthome") + system("initctl restart xsession/mthome") system("mv /usr/lib/qt4/plugins/testability/libtestability.so /tmp/.") sleep(4) - system "pkill MProgressIndicator" + system("initctl stop xsession/MProgressIndicator") + end @@ -133,6 +134,7 @@ class TC_PerformanceTests < Test::Unit::TestCase else @pos = `#{GET_COORDINATES_SCRIPT} -a #{@options[:application]}` + puts @pos sleep (2) @@ -151,7 +153,7 @@ class TC_PerformanceTests < Test::Unit::TestCase # First line tells when the button is released @start_time = lines[0] - puts "Clicked: #{lines[0]}" + puts "Started: #{lines[0]}" # Second one when the first pixel has changed its color @end_time = lines[1] puts "Pixel changed: #{lines[1]}"