Changes: Improved the perf tests by checking the system load before start

RevBy:TrustMe
pull/1/head
Olli Leppanen 15 years ago
parent bf00cca3d7
commit 302cbc8da7

@ -88,18 +88,15 @@ class TC_PerformanceTests < Test::Unit::TestCase
else else
system "mcetool --set-tklock-mode=unlocked" system "mcetool --set-tklock-mode=unlocked"
end 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/sysuid")
system("initctl stop xsession/applifed") system("initctl stop xsession/applifed")
system("initctl stop xsession/search") system("initctl stop xsession/search")
system("/sbin/initctl restart xsession/mthome")
system("mv /usr/lib/qt4/plugins/testability/libtestability.so /tmp/.") system("mv /usr/lib/qt4/plugins/testability/libtestability.so /tmp/.")
# system("pkill call-history")
sleep(4) sleep(4)
system "pkill MProgressIndicator"
end end
@ -124,7 +121,9 @@ class TC_PerformanceTests < Test::Unit::TestCase
if @options[:command] != nil if @options[:command] != nil
puts "#{GET_COORDINATES_SCRIPT} -g" puts "#{GET_COORDINATES_SCRIPT} -g"
system "#{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]} &" start_command ="`#{PIXELCHANGED_BINARY} -q >> #{PIXELCHANGED_LOG} &`; #{FALA_GETTIME_BINARY} \"Started from command line\" >> #{PIXELCHANGED_LOG}; #{@options[:command]} &"
puts "start command: #{start_command}" puts "start command: #{start_command}"
system "#{start_command}" system "#{start_command}"
@ -137,6 +136,7 @@ class TC_PerformanceTests < Test::Unit::TestCase
puts @pos puts @pos
sleep (2) 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" system "#{PIXELCHANGED_BINARY} -c #{@pos} -f #{PIXELCHANGED_LOG} -q"
sleep (4) sleep (4)
system "pkill #{appName}" system "pkill #{appName}"

Loading…
Cancel
Save