Changes: Performance test modified. Tracking pixel co-ordinates changed.

RevBy: TrustMe
pull/1/head
Nimika Keshri 15 years ago
parent 8d9266816f
commit 984216b04c

@ -136,7 +136,7 @@ if @meegoHome.test_object_exists?(:text => appName)
icon = @meegoHome.SwipeLauncherButton(:text => appName) icon = @meegoHome.SwipeLauncherButton(:text => appName)
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400 while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
@meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300) @meegoHome.SwipePannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 350)
sleep(0.2) sleep(0.2)
icon.refresh icon.refresh
end end

@ -219,7 +219,7 @@ class TC_PerformanceTests < Test::Unit::TestCase
print_debug("Check the avarage system load is under 0.3") print_debug("Check the avarage system load is under 0.3")
system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 100 -d" system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 100 -d"
start_command ="`#{PIXELCHANGED_BINARY} -t 20x20 -t 840x466 -q >> #{PIXELCHANGED_LOG} &`; #{FALA_GETTIME_BINARY} \"Started from command line\" >> #{PIXELCHANGED_LOG}; #{@options[:command]} &" start_command ="`#{PIXELCHANGED_BINARY} -t 101x4 -t 845x473 -q >> #{PIXELCHANGED_LOG} &`; #{FALA_GETTIME_BINARY} \"Started from command line\" >> #{PIXELCHANGED_LOG}; #{@options[:command]} &"
print_debug ("start command: #{start_command}") print_debug ("start command: #{start_command}")
system start_command system start_command
@ -228,16 +228,29 @@ class TC_PerformanceTests < Test::Unit::TestCase
@pos = `#{GET_COORDINATES_SCRIPT} -a #{@options[:application]}` @pos = `#{GET_COORDINATES_SCRIPT} -a #{@options[:application]}`
@pos = @pos.split("\n")[-1] @pos = @pos.split("\n")[-1]
print_debug ("Co-ordinates: #{@pos}") print_debug ("Co-ordinates: #{@pos}")
x_val = Integer(@pos.split("x")[0])
y_val = Integer(@pos.split("x")[1])
print_debug("Check the avarage system load is under 0.3") print_debug("Check the avarage system load is under 0.3")
system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 50 -d" system "/usr/bin/waitloadavg.rb -l 0.3 -p 1.0 -t 50 -d"
cmd = 0
if (x_val >= 0 && x_val <= 420)
if (y_val >= 240 && y_val <= 480)
cmd = "#{PIXELCHANGED_BINARY} -c #{@pos} -t 101x4 -t 845x473 -f #{PIXELCHANGED_LOG} -q"
elsif (y_val >= 0 && y_val <= 239)
cmd = "#{PIXELCHANGED_BINARY} -c #{@pos} -t 101x473 -t 845x4 -f #{PIXELCHANGED_LOG} -q"
end
elsif (x_val >= 421 && x_val <= 900)
if (y_val >= 240 && y_val <= 480)
cmd = "#{PIXELCHANGED_BINARY} -c #{@pos} -t 101x473 -t 845x4 -f #{PIXELCHANGED_LOG} -q"
elsif (y_val >= 0 && y_val <= 239)
cmd = "#{PIXELCHANGED_BINARY} -c #{@pos} -t 101x4 -t 845x473 -f #{PIXELCHANGED_LOG} -q"
end
end
cmd = "#{PIXELCHANGED_BINARY} -c #{@pos} -t 20x20 -t 840x466 -f #{PIXELCHANGED_LOG} -q"
print_debug("pixel changed command is : #{cmd}") print_debug("pixel changed command is : #{cmd}")
system cmd system cmd
sleep (4) sleep (4)
# Raise meegotouchhome to the top. # Raise meegotouchhome to the top.
#Workaround for keeping the window stack in shape. #Workaround for keeping the window stack in shape.
print_debug("#{GET_COORDINATES_SCRIPT} -g") print_debug("#{GET_COORDINATES_SCRIPT} -g")

Loading…
Cancel
Save