Changes: Fix failing perf tests and added a check for lower startup

RevBy: TrustMe
pull/1/head
Nimika Keshri 16 years ago
parent 2fedc24bde
commit 4428dcd1de

@ -10,7 +10,7 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Command-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="500" level="System" insignificant="true">
<case name="Perf-Test-Command-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="500" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c "invoker --type=m /usr/bin/fala_wl" -b "fala_wl" -s 600 -t 50 -w 10 -f "/tmp/fala_wl.log" &gt; /tmp/perf_commandline_with_launcher.txt</step>
</case>
@ -35,8 +35,8 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Grid-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="840" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_wl -b "fala_wl" -s 750 -t 50 -w 10 -f "/tmp/fala_wl.log" &gt; /tmp/perf_grid_with_launcher.txt</step>
<case name="Perf-Test-Grid-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="840" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_wl -b "fala_wl" -s 750 -m 150 -t 50 -w 10 -f "/tmp/fala_wl.log" &gt; /tmp/perf_grid_with_launcher.txt</step>
</case>
<post_steps>

@ -10,7 +10,7 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Command-QML-launcher" type="Performance" description="Measure startup time of the QML application using launcher" timeout="500" level="System" insignificant="true">
<case name="Perf-Test-Command-QML-launcher" type="Performance" description="Measure startup time of the QML application using launcher" timeout="500" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c "invoker --type=d /usr/bin/fala_qml_wl" -b fala_qml_wl -s 600 -f "/tmp/fala_qml_wl.log" &gt; /tmp/perf_commandline_qml_with_launcher.txt</step>
</case>
@ -35,8 +35,8 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Grid-QML-launcher" type="Performance" description="Measure startup time of the QML application using launcher" timeout="840" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_qml_wl -b fala_qml_wl -s 750 -f "/tmp/fala_qml_wl.log" &gt; /tmp/perf_grid_qml_with_launcher.txt</step>
<case name="Perf-Test-Grid-QML-launcher" type="Performance" description="Measure startup time of the QML application using launcher" timeout="840" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_qml_wl -b fala_qml_wl -s 750 -m 150 -f "/tmp/fala_qml_wl.log" &gt; /tmp/perf_grid_qml_with_launcher.txt</step>
</case>
<post_steps>

@ -10,11 +10,11 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Command-plain" type="Performance" description="Measure startup time of the application without launcher" timeout="500" level="System" insignificant="true">
<case name="Perf-Test-Command-plain" type="Performance" description="Measure startup time of the application without launcher" timeout="500" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c /usr/bin/fala_wol -b "fala_wol" -f "/tmp/fala_wol.log" &gt; /tmp/perf_commandline_without_launcher.txt</step>
</case>
<case name="Perf-Test-Command-QML-plain" type="Performance" description="Measure startup time of the qml application without launcher" timeout="500" level="System" insignificant="true">
<case name="Perf-Test-Command-QML-plain" type="Performance" description="Measure startup time of the qml application without launcher" timeout="500" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c /usr/bin/fala_qml_wol -b fala_qml_wol -f "/tmp/fala_qml_wol.log" &gt; /tmp/perf_commandline_qml_without_launcher.txt</step>
</case>
@ -47,7 +47,7 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_wol -b "fala_wol" -f "/tmp/fala_wol.log" &gt; /tmp/perf_grid_without_launcher.txt</step>
</case>
<case name="Perf-Test-Grid-QML-plain" type="Performance" description="Measure startup time of the qml application without launcher" timeout="840" level="System" insignificant="true">
<case name="Perf-Test-Grid-QML-plain" type="Performance" description="Measure startup time of the qml application without launcher" timeout="840" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_qml_wol -b fala_qml_wol -f "/tmp/fala_qml_wol.log" &gt; /tmp/perf_grid_qml_without_launcher.txt</step>
</case>

@ -132,17 +132,17 @@ end
sleep(2)
if @meegoHome.test_object_exists?(:name => "LauncherButton", :text => appName)
icon = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName)
if @meegoHome.test_object_exists?(:text => appName)
icon = @meegoHome.SwipeLauncherButton(:text => appName)
while icon.attribute('visibleOnScreen') == 'false' || icon.attribute('y').to_i > 400
@meegoHome.MPannableViewport( :name => 'SwipePage' ).MWidget( :name => 'glass' ).gesture(:Up, 1, 300)
sleep(0.2)
icon.refresh
end
xpos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('x')
xpos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('x')
xpos = xpos.to_i + 59
ypos = @meegoHome.SwipeLauncherButton(:name => "LauncherButton", :text => appName).attribute('y')
ypos = @meegoHome.SwipeLauncherButton(:text => appName).attribute('y')
ypos = ypos.to_i + 58
@pos = "#{xpos}x#{ypos}"

@ -80,6 +80,12 @@ class TC_PerformanceTests < Test::Unit::TestCase
print_debug("The Startup limit is : #{options[:startup]}")
end
options[:minstartup] = nil
opts.on( '-m', '--minstartup MILLISECONDS', 'Time limit in milliseconds. Slower startup will make test to fail.' ) do|milliseconds|
options[:minstartup] = milliseconds.to_i
print_debug("The Minimum Startup limit is : #{options[:minstartup]}")
end
options[:appCache] = nil
opts.on( '-t', '--appCache MILLISECONDS', 'Time limit in milliseconds for application from cache.' ) do|milliseconds|
options[:appCache] = milliseconds.to_i
@ -165,6 +171,10 @@ class TC_PerformanceTests < Test::Unit::TestCase
system("initctl restart xsession/mthome")
sleep(10)
end
if not system "pgrep applauncherd"
system("initctl start xsession/applauncherd")
sleep(5)
end
end
@ -313,7 +323,11 @@ class TC_PerformanceTests < Test::Unit::TestCase
if @options[:startup] != nil
print_debug("Check that startup time is less than #{@options[:startup]} ms")
assert((start_time_sum/COUNT) < @options[:startup], "Application: #{@options[:application]} avarage startup was slower than #{@options[:startup]} ms")
assert((start_time_sum/COUNT) < @options[:startup], "Application: #{@options[:application]} avarage startup was higher than #{@options[:startup]} ms")
end
if @options[:minstartup] != nil
print_debug("Check that startup time is more than #{@options[:minstartup]} ms")
assert((start_time_sum/COUNT) > @options[:minstartup], "Application: #{@options[:application]} avarage startup was slower than #{@options[:minstartup]} ms")
end
if @options[:appCache] != nil

Loading…
Cancel
Save