From 302cbc8da730aa5bd17a6b50359fc3d1798b1e55 Mon Sep 17 00:00:00 2001 From: Olli Leppanen Date: Thu, 25 Nov 2010 12:43:42 +0200 Subject: [PATCH] Changes: Improved the perf tests by checking the system load before start RevBy:TrustMe --- tests/Harmattan/TestScripts/test-perf.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Harmattan/TestScripts/test-perf.rb b/tests/Harmattan/TestScripts/test-perf.rb index ac9001d..1ac7ab0 100755 --- a/tests/Harmattan/TestScripts/test-perf.rb +++ b/tests/Harmattan/TestScripts/test-perf.rb @@ -88,18 +88,15 @@ class TC_PerformanceTests < Test::Unit::TestCase else system "mcetool --set-tklock-mode=unlocked" end - #restart duihome so that qttasserver notices it - #NOTE: Remove the cludge after duihome -> meegotouchhome renaming is complete - if not system("/sbin/initctl restart xsession/duihome") - system("/sbin/initctl restart xsession/mthome") - end + system("initctl stop xsession/sysuid") system("initctl stop xsession/applifed") system("initctl stop xsession/search") + system("/sbin/initctl restart xsession/mthome") system("mv /usr/lib/qt4/plugins/testability/libtestability.so /tmp/.") -# system("pkill call-history") sleep(4) + system "pkill MProgressIndicator" end @@ -124,7 +121,9 @@ class TC_PerformanceTests < Test::Unit::TestCase if @options[:command] != nil puts "#{GET_COORDINATES_SCRIPT} -g" system "#{GET_COORDINATES_SCRIPT} -g" -# system "ls -l -s -R /usr/share/applications" + # Check the avarage system load is under 0.3 + system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 120 -d" + start_command ="`#{PIXELCHANGED_BINARY} -q >> #{PIXELCHANGED_LOG} &`; #{FALA_GETTIME_BINARY} \"Started from command line\" >> #{PIXELCHANGED_LOG}; #{@options[:command]} &" puts "start command: #{start_command}" system "#{start_command}" @@ -137,6 +136,7 @@ class TC_PerformanceTests < Test::Unit::TestCase puts @pos sleep (2) + system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 120 -d" system "#{PIXELCHANGED_BINARY} -c #{@pos} -f #{PIXELCHANGED_LOG} -q" sleep (4) system "pkill #{appName}"